Difference between primary key and unique key ?
Answer Posted / dpkar
Primary Key:
Primary key will create column data uniqueness in the table.
Primary key will create clustered index by default
Only one Primay key can be created for a table
Multiple columns can be consolidated to form a single
primary key
It wont allow null values.
Unique Key :
Unique key constraint will provide you a constraint like
the column values should retain uniqueness.
It will allow null value in the column.
It will create non-clustered index by default
Any number of unique constraints can be added to a table.
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
How does one get the view definition of fixed views/tables?
What is literal?
How to retrieve the count of updated rows?
Is rowid unique in oracle?
When system tablespace is created?
src name sex a,male b,female c,male d,female Required output : male female a,b c,d tried pivot but was not successfull select * from src pivot (max(name) for sex in ('MALE','FEMALE'));
Can multiple columns be used in group by in oracle?
Explain the use of show option in imp command.
How to divide query output into groups in oracle?
Explain integrity constraint?
What is the difference between sharding and replication?
Does oracle database need java?
How to drop a stored function?
Is the After report trigger fired if the report execution fails ?
Is oracle an operator?