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
Explain features of analysis services?
What is a subquery in a select query statement in ms sql server?
What happens if you insert a duplicate key for the primary key column in ms sql server?
Explain subquery and state its properties?
Can two tables share a primary key?
Define left outer join in sql server joins?
What is forward - only cursors / read only cursor?
What are the advantages of user defined function?
How can a user-defined datatype be created?
what method you can use to reduce the overhead of Reporting Services data sources?
Can We Use Data-grids For Our Report In Ssrs?
What is clustered vs nonclustered index?
Which language rdl files made of?
What methods do you follow to protect from sql injection attack?
Describe the functionalities that views support.