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
How to change sql*plus system settings?
What is view explain with example?
how to dump a table to a file with 'mysqldump'? : Sql dba
What are sql commands?
What are operators available in sql?
How long it takes to learn pl sql?
What is sqlerrm?
What is the use of nvl function?
How do you bind variables in pl sql?
Is delete faster than truncate?
Cite the differences between execution of triggers and stored procedures?
What is the difference between partitioning and sharding?
how to get @@error and @@rowcount at the same time? : Sql dba
what are the disadvantages of mysql? : Sql dba
Does mysql support pl sql?