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


Please Help Members By Posting Answers For Below Questions

what is a trigger? : Sql dba

576


Is sql a programming?

547


Does truncate need commit?

518


Can we perform dml on view?

556


What is the difference between truncate and drop statements?

577






How sql query is executed?

553


What are the differences between implicit and explicit cursors?

518


What is Difference Between Unique and Primary Key Constraints?

606


How to prepare for oracle pl sql certification?

569


What is an index in sql with example?

519


What is the purpose of a sql?

529


What is difference sql and mysql?

535


How many sql commands are there?

675


what are aggregate and scalar functions? : Sql dba

552


what is a database lock ? : Sql dba

594