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 ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are the different ddl commands in sql?
Could you please provide oca (oracle 10g) dumps for my certification ?
How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?
Can %notfound return null after a fetch?
How can a function retun more than one value in oracle with proper example?
what are string data types? : Sql dba
What types of commands can be executed in sql*plus?
How are sql commands classified?
what is the difference between ereg_replace() and eregi_replace()? : Sql dba
what is the syntax for using sql_variant_property? : Transact sql
What is sqlcommand?
what is the difference between truncate and delete statement? : Transact sql
What is implicit cursor in pl sql?
What are all the common sql functions?
Explain the difference between drop and truncate commands in sql?