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 to run 'mysql' commands from a batch file? : Sql dba
What is a design view?
How many columns should be in an index?
Explain what is a database?
What is the need of merge statement?
how to convert character strings to numeric values? : Sql dba
what are the types of subquery? : Sql dba
Differentiate pl/sql and sql?
Is sqlite free?
What is #table in sql?
What is out parameter used for eventhough return statement can also be used in pl/sql?
Which query operators in sql is used for pattern matching?
What are the set operators in sql?
How do you create an update query?
Why is pl sql used?