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
Sql technical questions
What does cursor do in sql?
What does the base_object_type column shows in the user.triggers data dictionary view?
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
How to change the order of columns in Oracle SQL Plus ?
What is trigger with example?
what are the properties and different types of sub-queries? : Sql dba
What do you know by pl/sql cursors?
What are the operators in sql?
What are the differences between implicit and explicit cursors?
What is sqlca in powerbuilder?
How to move files from one directory to another in pl sql?
Explain sql data types?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
What is a sql statement?