+ 2
What is primary key and forein key in sql????
2 Respostas
+ 17
primary key constraint
1)no duplicate values 2)no null values
foreign key : its a non-key attribute which derives its value from primary key of another table
its used when we want to connect tables through common fields & field connecting tables should have primary key to maintain referencial integrity
0
Primary key is the unique identifier of that record of that table. The foreign key is the unique identifier of a different table that the record references or links to.