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
What is graph sql?
How many joins can you have in sql?
What is difference between ms sql and mysql?
Why do we need unique key in a table?
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
What is an escape character in sql?
What are the types of queries in sql?
Why triggers are used?
What are the different types of tables in sql?
What is a column in a table?
What is dense_rank in sql?
what is a materialized view? : Sql dba
Explain the insert into statements in sql?
How to use distinct and count in sql query? Explain
What is the use of index in sql?