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 do you rename a table in sql?
what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba
Why procedure is used in sql?
name 3 ways to get an accurate count of the number of records in a table? : Sql dba
What is mutating sql table?
How do you optimize a stored procedure query?
Is a foreign key always unique?
What is sql procedures and functions?
What are local and global Indexes and where they are useful.
Is oracel sql developer written in java?
What is the difference between database trigger and stored procedure?
Why cross join is used?
what is a materialized view? : Sql dba
Is there a way to automate sql execution from the command-line, batch job or shell script?
How to create your own reports in sql developer?