What
is clustered Index?
1.
The clustered Index is created
automatically on primary key column.
2.
One table can only create one and
only clustered Index.
3.
Clustered index is sorting all the
rows physically.
4. Clustered index is works based on the Binary tree concept.
4. Clustered index is works based on the Binary tree concept.
How
to Create Clustered Index?
-- CREATE CLUSTERED INDEX
CREATE CLUSTERED INDEX Indexname_EmlloyeeClust
ON Employee
(
[EmpName] ASC or DESC,
[EmpDepartment]
ASC or DESC
)
-- OR
-- CREATE CLUSTERED INDEX
CREATE CLUSTERED INDEX Indexname_EmlloyeeClust
ON Employee
(
[EmpName] ASC,
[EmpDepartment]
ASC
)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF,
IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = OFF)
ON [PRIMARY]
I hope you enjoying with this post! Thank you
very much!