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
How do I install sql?
Define commit, rollback and savepoint?
Can you join views in sql?
explain advantages of innodb over myisam. : Sql dba
What is the advantage of nosql?
What is rownum in sql?
is mysql query is case sensitive? : Sql dba
What does subquery mean in sql?
Is left join same as inner join?
What is an exception in PL/SQL? What are the two types of exceptions?
What does the sign mean in sql?
Are subqueries better than joins?
How to execute a stored procedure?
Explain normalization and what are the advantages of it?
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?