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
Explain overloading. Can functions be overloaded?
What are the ansi data types supported in oracle?
Explain the use of Merge statement in oracle 11g
Is oracle a language?
What is Trigger in Oracle?
What is a synonym? What are its various types?
How to lock and unlock a user account in oracle?
How to define an oracle cursor variable?
what is meant by magic query
What are the predefined tablespaces in a database?
How to fetch the row which has the max value for a column?
How many data types are supported?
What is the data pump export utility?
WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?
How to install oracle database 10g xe?