I am just learning about Indexing in SQL server but got confuse between Clustered and Unique index. if both are applied on a unique key column ex: PersonID. so what is difference between both.
Thanx.
The two are unrelated:
You can have all 4 permutations:
Some confusion occurs because the default for a "primary key" (PK) in SQL Server is clustered.
A "primary key" must always be unique though. The difference between "unique" and "PK" is that unique allows one NULL, PK doesn't allow any NULLs.
Finally, some number limits
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With