What's the difference between a primary key and a unique key?

Answer Posted / srinivas

Primary key is a combination of unique+not null+cluster
index and it will not allow any duplicate values, null
values, and it's data will be arranged in ascending order
due to clustered index. Only one primary key is allowed
per table.

Unique key is a key which will not accept any duplicate
values, but it will accept one null value. We can place
any number of unique keys per table.

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can you check the level of fragmentation on a table? : Sql server administration

535


What is the data tier application?

145


What is a db view?

514


What is a result set object returned by mssql_query()?

574


How to resolve the orphan use problem? : sql server security

523






What are different types of database indexes?

524


How to create user defined functions with parameters?

636


How to receive returning result from a query?

581


what is dbcc? : Sql server database administration

519


How to stop log file growing too big?

571


You want to generate a report that is formatted as a chart. Can you use the report wizard to create such a report?

88


Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio

519


How do you delete a trigger?

573


Explain user defined functions?

611


How do you create an execution plan?

492