what is the difference between primary key & foreign key?
Answer Posted / raffi.shaik
Primary key is unique
primary key is not NULL and
foreign key is NULL
foreign key reference as Primary key in another table
Primary key is unique key but foreign key always refers to
primary key
primary key is used to identify a row and it does not allow
null values. It avoids duplication of rows.
whereas foreign key refers to a column or combination of
columns included in the definition of referential integrity.
In the context of relational databases, a foreign key is a
referential constraint between two tables.[1] The foreign
key identifies a column or a set of columns in one
(referencing) table that refers to a column or set of
columns in another (referenced) table. The columns in the
referencing table must form a primary key or unique key.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
State all possible different index configurations a table can possibly have?
What is an Oracle index?
How to invoke the data pump export utility?
How to select some rows from a table in oracle?
Explain how you would restore a database using RMAN to Point in Time?
nw i'm doing MBA system and planning to do oracle,database management.tell me that whether it is useful r not?.refer any course for my carrier pls
What is background process in Oracle?
Hi friends can u send the oracle 9i full version download link?????????????? please reply ?
Who developed oracle & when?
Where do we use decode and case statements?
What is a data lock in oracle?
Explain do view contain data?
What is a sub query and what are the different types of subqueries?
How to start your 10g xe server?
What to do if dba lost the system password?