What is the difference between UNIQUE CONSTRAINT and
PRIMARY KEY?
1. There is no difference.
2. A PRIMARY KEY cannot be declared on multiple columns.
3. A UNIQUE CONSTRAINT cannot be declared on multiple
columns.
4. A table can have multiple PRIMARY KEYS but only one
UNIQUE CONSTRAINT.
5. A table can have multiple UNIQUE CONSTRAINTs but only
one PRIMARY KEY.
Answer Posted / rajesh.m
There is no difference.
The One & only Difference is a UNIQUE would allow Null
Values where as The Primary Key Not.
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
Do prepared statements prevent sql injection?
How do I find duplicates in sql?
What is a record in a database?
Explain exception handling in pl/sql?
What is the maximum database size for sql express?
what is the difference between ereg_replace() and eregi_replace()? : Sql dba
How is indexing done in search engines?
Define select, insert, create, delete, update, drop keywords
What is the advantage of nosql?
What do you mean by table in sql?
Are pl sql variables case sensitive?
What are the two types of exceptions in pl/sql?
how can we submit a form without a submit button? : Sql dba
Is a view faster than a stored procedure?
What is the difference between distinct and unique in sql?