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
What do you know about normalization? Explain in detail?
What is an oracle tablespace?
What is the implicit cursor in oracle?
Where do we use decode and case statements?
How to assign a tablespace to a users in oracle?
What are the database administrators utilities available?
What is the usage of merge statement?
How to create a temporary table in oracle?
what are actual and formal parameters?
Hi friends can u send the oracle 9i full version download link?????????????? please reply ?
How to experiment a data lock in oracle?
What is an external table?
How to view all columns in an existing table?
What is oracle server autotrace in oracle?
Name the various constraints used in oracle?