Difference between primary key and unique key ?
Answer Posted / bhushan tatar
column having primary key constraint should not contain
null values.
column having unique key constraint can contain null values.
Unique as well as primary key constraint can be
defined/applyed on more than one column.
EX.
ADD constraint uc_person UNIQUE(P_Id,Lastname)
ADD constraint uc_person PRIMARY KEY(P_Id,Lastname)
But whle creating table we can write unique key word
multiple time and primary key wprd only once.Because table
can have only one primary key and can have miltiple unique
key.But both can apply on more than one column.
and
Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
Why we use bulk collect in oracle?
Difference between the “verify” and “feedback” command?
What is the usage of analyze command in oracle?
Explain implicit cursor.
How to put more than 1000 values into an oracle in clause?
How to loop through a cursor variable?
What is the difference between hot backup and cold backup in oracle?
How to convert raw data type into text in oracle? Explain
Give the different types of rollback segments.
What is a data dictionary and how can it be created?
What is open database communication (odbc) in oracle?
Can we convert a date to char in oracle and if so, what would be the syntax?
List out the components of logical database structure of oracle database.
How to compare dates in oracle sql?
How to view all columns in an existing table?