What is the difference between the Primary and Foreign key?
Answer Posted / dhirendra
Primary Key: This is a constraint which is always unique &
not null.
Foreign Key: This is a constraint which is just opposite to
Primary key. It can be not Null & can accept duplicate value
as well. Foreign key points to same table's primary key or
another table's primary key to make a relationship.
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
What is cte sql?
What is relationship? How many types of relationship are there?
how to extract a unit value from a date and time? : Sql dba
What is view? Can we update view
What is the use of primary key?
How do you take the union of two tables in sql?
How to avoid using cursors?
Why procedure is used in sql?
What is pivot in sql?
Can function return multiple values in sql?
Enlist the data types that can be used in pl/sql?
What is offset in sql query?
What is lookup table in sql?
Explain the difference between drop and truncate commands in sql?
What is sqlexception in java?