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 is Segment Advisor in Oracle?
How to convert characters to dates in oracle?
Point out the difference between user tables and data dictionary?
How to execute a stored procedure in oracle?
What is private procedure oracle?
How to sort the query output in oracle?
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
Why do we use bulk collect in oracle?
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?
What is the string concatenation operator in oracle?
How many memory layers are in the oracle shared pool?
15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.
Explain the use of show option in imp command.
What is integrity and what is constraint??Explain with example
Explain the truncate in oracle?