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
Can group functions be used in the order by clause in oracle?
What is a proxy object?
State all possible different index configurations a table can possibly have?
How oracle handles dead locks?
How to unlock the sample user account in oracle?
What is format trigger?
How to write a query with a right outer join in oracle?
What will be the syntax to find current date and time in format "yyyy-mm-dd"?
how can we store any pdf file in oracle
What happens if variable names collide with table/column names?
What is the difference between sharding and partitioning?
What privilege is needed for a user to insert rows to tables in another schema?
Why do we need oracle client?
hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.
What is the difference between a hot backup and a cold backup in oracle?