question

minijebu avatar image
minijebu asked

Difference between a clustered index and unique clustered index?

What is the difference between a clustered index and unique clustered index?
index
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Cyborg avatar image
Cyborg answered
If your clustered index is unique, it doesn't allows you any duplicate keys in your table and if Clusterd index is non unique it allows you duplicate keys but internally SQL Server adds 4 bytes hidden uniquifier column with the keys to make them unique.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

minijebu avatar image minijebu commented ·
Thanks Cyborg
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.