What is the difference between the Primary and Foreign key?
Answer Posted / suresh babu
Primary key and foreign key both are constraints.
Primary key:We can create only one primary key for a
table,which never allows the repeated or duplicate values
and null values.The index will be created when defining a
primary key.And primary key is used to make a relation
between more than one tables.
Foreign key:It allows the duplicate and null values.if we
want to make a relation between two tables,the parent table
column must have primary column and child table column
called foreign key.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Is record in oracle pl sql?
What is rownum in sql?
what is rdbms? : Sql dba
Why is partition used in sql?
Explain the difference in execution of triggers and stored procedures?
What is the purpose of my sql?
When to use inner join and left join?
What is the purpose of cursors in pl/sql?
What sql database should I use?
Explain mutating table error.
Define SQL and state the differences between SQL and other conventional programming Languages?
What are types of exception?
What is the use of stored procedures?
how to rename an existing column in a table? : Sql dba
Why does sql need a server?