3
Answers

Primary key column and duplicate foreign key value

 Please help me, Is it possible to insert unique value in Primary key column and duplicate corresponding value in foreign key column table?

I need to insert unique value in Primary key column and duplicate corresponding value in foreign key column. Like a field wih S01, S02, S03 in primary key column and many S01 , S01 in foreign key column table 

Answers (3)

1
Photo of Biswa Pujarini Mohapatra
NA 6.4k 1.5m 10y
Yes it is possible, that is the basic use of primary and foreign key, generally if you make a column as primary key it will not allow you to insert duplicate
Accepted
1
Photo of Bidyasagar Mishra
NA 5.3k 379.6k 8y
Primary key column will never allow you to insert duplicate records. Also one thing you should always remind we cant create more than one primary key column in a table
0
Photo of Manchana Shrestha
NA 3 1.8k 10y
Thank you so much.