top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between candidate key, unique key and primary key in Oracle?

+2 votes
1,112 views
What is the difference between candidate key, unique key and primary key in Oracle?
posted Oct 9, 2014 by Suchithra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
 
Best answer

Candidate keys are the columns in the table that could be the primary keys and the primary key is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table.

answer Oct 10, 2014 by Arun Gowda
0 votes

The primary key is the columns used to uniquely identify each row of a table.A table can have only one primary key. It can not accept the duplicate and null values.
Foreign keys is a field in database table that is primary key in another table. It can accept multiple null and duplicate values.
Unique key is a one or more column that must be unique for each row of the table.It is similar to primary key. Primary key column will not accept a null. Whereas the unique key column will accept a null values.

answer Nov 15, 2014 by Manikandan J
super
...