What is the difference between the Primary and Foreign key?
Answer Posted / slokh
Primary key does not contain NULL or duplicate values.
whereas Foreign key accepts duplicate values but not null
values.
Primary key states the Entity integrity constraint, which
says that every row in a table is unique.
Foreign key states the referential integrity constraint,
that says that you can only insert values that is present
in the primary of the parent table.
Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
Why is sql important?
how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba
what are date and time data types? : Sql dba
what is a trigger in mysql? Define different types of trigger. : Sql dba
Can we rename a column in the output of sql query?
What is a temporal data type?
What is data types in sql?
What does where 1 1 mean in sql?
Is sql a backend?
Why do we need databases?
What are character functions in sql?
Are sql connections encrypted?
What is the use of sqlerrd 3?
What is string join?
What is field delimiter?