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
Why do we use procedures?
What are the commands used in sql?
Which version of sql do I have?
what is 'mysqldump'? : Sql dba
What are the different types of database management systems?
what is subquery? : Sql dba
What is normalization in sql?
Why should I use postgresql?
What are the various restrictions imposed on view in terms of dml?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
Can we join tables without foreign key?
What is mutating error?
Can we create table inside stored procedure?
What is the use of partition by in sql?
What is sql key?