what is the difference between primary key & foreign key?

Answer Posted / ansul singh

Primary key is unique key but Foreign key always refers to
primary key.
Primary key is the parent & Foreign key is the child.
Primary key is unique, Primary key is not null and
Foreign key is null, Foreign key reference as primary key
is another table.
Primary key will not allow "Null values" & "Duplication
values",
Foreign key will allow "Null values & "Duplicate values" &
it refers to a primary key is another table.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the attributes of cursor?

587


What happens to the indexes if a table is recovered?

574


Why do we use bulk collect in oracle?

569


If a parameter is used in a query without being previously defined, what diff. exist betw. report 2.0 and 2.5 when the query is applied ?

1793


How do I connect to oracle database?

533






How can you merge two tables in oracle?

565


How to invoke the data pump export utility?

558


Query to retrieve record for a many to many relationship ?

2077


What is the difference between "as" and "is" in an oracle stored procedure?

537


Explain what are synonyms used for?

605


What is integrity and what is constraint??Explain with example

1695


How to create a new oracle data file?

552


Is primary key indexed by default in oracle?

543


What is oracle join syntax?

569


How to create id with auto_increment on oracle?

545