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

Answer Posted / karthick

PRIMARY KEY AND UNIQUE KEY

* Both Enforces Uniqueness
* Primary key Creates clustered index
unique key creates non clustered index
* primay key does not allows null value
unique key allows 1 null value

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can two tables share the same primary key?

497


Explain iaas, paas and saas?

74


What is multilevel indexing?

527


How many full-text indexes can a table have?

546


Can you leave a union at any time?

531






What is a trigger? Why we need it?

529


How many types of built in functions are there in sql server 2012?

486


Define self join?

624


How to define the name and server for a new dsn?

545


What is user defined stored procedures?

559


How can we solve concurrency problems?

566


What is the purpose of data source?

509


What is the difference between varchar and varchar(max) datatypes?

551


What are exact numeric data types in ms sql server?

508


What are the essential components of sql server service broker?

559