What is the difference between the Primary and Foreign key?
Answer Posted / nitin
Primary key uniquely identified a record in a table and dont have null values. Also when we create primary key an index is automatically created for primary key.
On the other hand foreign key is used for referential integrity, foreign key can points to primary key in other table and moreover index is not created for foreign key.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is sql data?
Write a query to find the names of users that begin with "um" in sql?
Does inner join return duplicate rows?
How many types of triggers exist in pl/sql?
What is the difference between rename and alias?
what is collation? : Sql dba
What is offset and limit in sql?
Why do we use cursors?
what are myisam tables? : Sql dba
name 3 ways to get an accurate count of the number of records in a table? : Sql dba
How do I view a view in sql?
What is record variable?
How to return multiple rows from the stored procedure?
what is single byte over head in oracle..?
What is mutating error in pl sql?