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 to check the server version in oracle?
What are the ways tablespaces can be managed and how do they differ?
What is rich query?
Explain the use of Merge statement in oracle 11g
What is a cursor in oracle?
How to convert a date to char in oracle? Give one example.
What is the usage of save points in oracle database?
What is an oracle tablespace?
What are internal user account in oracle?
Explain drop constraint oracle?
What do you mean by merge in oracle and how can you merge two tables?
How to create a new table in oracle?
How to compare dates in oracle sql?
What happens if you lost a data file?
How can we create the complete backup of data in the oracle.