What is the difference between the Primary and Foreign key?
Answer Posted / nitin
Primary key uniquely identified a record in a table and dont have null values. Also when we create primary key an index is automatically created for primary key.
On the other hand foreign key is used for referential integrity, foreign key can points to primary key in other table and moreover index is not created for foreign key.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is difference between sql and excel?
Is drop table faster than truncate?
How many triggers can be applied on a table?
What are different sql data types?
What is the difference between partitioning and sharding?
What is keys and its types?
What is sql server and ase?
What are sql indexes?
how to get a list of indexes of an existing table? : Sql dba
What is query execution plan in sql?
What are all the different normalizations?
What is sql entity?
What does rownum mean in sql?
Are stored procedures faster than queries?
Can I learn sql in a week?