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
what are properties of a transaction? : Sql dba
How do I find duplicates in sql?
What is data profiling in sql?
What is the advantage of index in sql?
Can we use threading in pl/sql?
What is the purpose of design view?
What type of database is cloud sql?
What is rtm in testing?
Can we use the cursor's to create the collection in PL/SQL?
What is record type in pl sql?
What is the purpose of the primary key?
What is difference between stored function and application function?
What sql database should I use?
How do you sort in sql?
What are the query optimization techniques?