What's the difference between a primary key and a unique key?
Answer Posted / mrityunjay kumar
There are difference between Primary key and unique key.
1. Primary key allow not null value where as unique key
allow only one null value.
2. Primary key Creates clustered index where as unique key
creates non clustered index.
3. Primary key is only one in a table where as unique key
is multiple in a table.
4. Primary key is not accept duplicate value where as
Unique key is also not accept any duplicate values, but it
will accept one null value.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is partition in sql server?
How to write a query with a left outer join in ms sql server?
Explain the properties of the relational tables?
Is the log file is a part of file group?
What are the differences between stored procedure and view in sql server?
What stored by the master?
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
Differentiate between delete and truncate.
What is amo? : sql server analysis services, ssas
how you can configure a running aggregate in SSRS?
What is row_number () and partition by in sql server?
What are the properties of the transaction?
Explain nested join?
How to encrypt data between dialogs?