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
how is myisam table stored? : Sql dba
How to return an array from java to pl/sql?
How to avoid using cursors?
What are all ddl commands?
What is the difference between nvl function, ifnull function, and isnull function?
What is a database? Explain
Does oracle use sql?
What is a boolean in sql?
What is the usage of the distinct keyword?
What is a composite primary key?
What is oracle sql developer?
How do you write a complex sql query?
How many types of normalization are there?
What is procedure and function?
What is normalization sql?