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
How can you tell the difference between an index and a view?
What is data type in sql?
How do you bind variables in pl sql?
Is primary key an index?
What is query optimization in sql?
Why use triggers in sql?
What is the difference between Union and Union all. Which is faster.
What is string data type in sql?
What is sql stand for?
How can I tell if sql is running?
What does varchar include?
What is difference between function and trigger?
What is the trigger in sql?
How do you optimize a query?
How do you explain an index?