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 are the system privileges that are required by a schema owner (user) to create a trigger on a table?
What are different clauses used in sql?
Explain what is a database?
what is recursive stored procedure? : Sql dba
Is mariadb a nosql database?
Is there a 64 bit version of ssms?
What is the difference between explicit and implicit cursors in oracle?
What does count (*) mean?
How does cross join work in sql?
What does where 1 1 mean in sql?
Is left join faster than inner join?
What is java sql drivermanager?
Are dml statements autocommit?
Is t sql a programming language?
What is a pragma statement?