what is the difference between primary key & foreign key?

Answer Posted / abhishek ranjan

The main diference between primary key and the foreign key is that the primary key is a column or a set of columns that can be used to uniquely identify a row in a table while the foreign key is a column or a set of columns that refer to a primary key or a candidate key of another table. Foreign key mainly provides a method to link information in several tables. Another difference is that a table can have a single primary key, but it can have multiple foreign keys that can reference different tables.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between cartesian join and cross join?

541


How to join two tables in a single query using oracle?

564


Explain the difference between sap and oracle?

574


What is recovery manager(rman) backup in Oracle?

625


how can we store any pdf file in oracle

1638






Describe varray?

585


For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?

1555


How can we create the complete backup of data in the oracle.

1682


How to return top 5 rows in oracle?

545


How to connect to oracle using service name instead of sid?

547


How to use "for" statements in oracle?

588


How to get last row id?

556


How can we force the database to use the user specified rollback segment?

556


What is the simplest tool to run commands on oracle servers?

512


How to add another datafile to a tablespace?

576