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.
sql-serversql-server-2005sql-server-2008
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.
Best Solution
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