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
Does asenumerable execute the query?
Which are the different types of indexes in sql?
How do you use join?
Is primary key an index?
What is normalization? How many normalization forms are there?
How do I edit a stored procedure?
What are the types of join and explain each?
What is a unique key?
What are primary key and foreign key and how they work?
What is dense_rank?
What is an index in sql with example?
What does partition by mean in sql?
What are the different types of triggers?
Why procedure is used in sql?
What is the use of procedures?