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 / sunitha

yes, i agree with Rajesh ,primary key constraint doesn't allow null values but unique constraint allows null values.this is the main difference .

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When you have to use a default "rollback to" savepoint of plvlog?

724


How many commands are in sql?

528


what is the difference difference between procedure and packages

9226


Define commit?

556


What is the best sql course?

534






what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

558


Which are sql * plus commands?

539


What are different types of sql?

564


What is thread join () in threading?

542


Does truncate require commit?

546


Write a sql query to find the names of employees that begin with ‘a’?

578


What is trigger in pl sql?

562


Who developed sql?

571


How do I find duplicates in two columns?

553


How does a trigger work?

539