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 Oracle guarantee data integrity of data changes?
What is max rowid in oracle?
How to pass a cursor variable to a procedure?
A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.
What is a partition in oracle?
Differentiate between pre-select and pre-query?
What are the different types of synonyms?
How to create a server parameter file?
Why do we use bulk collect in oracle?
How to resolve the ORA-39133 error in Oracle?
What is using clause and give example?
What do you mean by merge in oracle and how can we merge two tables?
What is an oracle database?
what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?
Explain about your project and its relation to the current job position you are applying to?