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
What is the most common sql injection tool?
Is delete faster than truncate?
Why is sql important?
What is pl sql code?
what is a trigger? : Sql dba
how can you see all indexes defined for a table? : Sql dba
What has stored procedures in sql?
What is the use of function in sql?
What is the difference between execution of triggers and stored procedures?
What are dml commands?
Is oracle and sql same?
What is group by in sql?
can a stored procedure call itself or recursive stored procedure? : Sql dba
what are numeric data types? : Sql dba
Explain the insert into statements in sql?