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
How optimize sql query with multiple joins in sql server?
Explain what is dbcc?
What is the difference between online clustering and Offline clustering?
What is SQL Azure Firewall?
What happens when converting big values to integers?
What is row_number () and partition by in sql server?
Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.
What is reportserver and reportservertempdb ?
What is the use of partition by in sql server?
How to create a new login name in ms sql server?
Explain ranking functions?
What is the use of commit?
What are the different types of replication you can set up in sql server?
What is NOT NULL Constraint in sql server 2012?
what type of index will get created after executing the above statement? : Sql server database administration