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 to list all columns in a table using odbc_columns()?
Explain about builtinadministrator?
Write a SQL query to delete a table?
What is difference between count (*) and count 1?
what is the difference between count(*) and count(1) ?
how many clustered indexes can be created on a table? : Sql server database administration
What is simple indexing method?
How to delete all rows with truncate table statement in ms sql server?
Difference between LEN() and DATALENGTH() in sql server ?
What is query parameter in ssrs?
How do you run a trace?
What is the difference between value type and reference type?
What are the rendering extensions of ssrs?
What is a unique index?
What options are available to audit login activity? : sql server security