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 are trace files?
What is the difference between a primary key and a unique key? Are they the same?
What is outer join in sql server joins?
what are cursors? : Sql server database administration
hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail
How to use wildcard characters in like operations in ms sql server?
what is the difference between Delete and Truncate command in SQL
How to insert and update data into a table with "insert" and "update" statements?
How much does sql server 2016 cost?
What is use of @@ spid in sql server?
What is difference between views and tables?
What is sql collation?
What is the difference between deallocate cursor and close cursor?
what are the different types of SSRS reports?
A trigger can reference objects outside the current database? State true or false.