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
How can I tell if sql is running?
how many triggers are allowed in mysql table? : Sql dba
What is meant by cursor in sql?
How to assign sql query results to pl sql variables?
What is column?
What is procedure explain with example?
Do stored procedures prevent sql injection?
How many triggers can be applied on a table?
Why stored procedure is better than query?
How to make a copy values from one column to another in sql?
Is pl sql a scripting language?
Do prepared statements prevent sql injection?
tell me about various levels of constraint. : Sql dba
What is the best sql course?
How many sql databases can you have on one server?