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

What is the difference between seek predicate and predicate?

665


How do I delete a sql server database?

634


What is logon trigger?

623


Define msdb database?

680


How to skip remaining statements in a loop block using continue statements?

651






Why variables called the most powerful component of ssis?

692


How do you run a trace?

610


Explain what stored procedure sp_replcounters is used for? : sql server replication

1125


How do you delete a data source?

654


What are character string data types in ms sql server?

717


Can we update data in a view?

698


What is the difference between char and varchar2 datatype in sql?

635


What is difference between views and stored procedures?

604


What are trace files?

611


can you instantiate a com object by using t-sql? : Sql server database administration

613