case in sql server 2008 r2

What is clustered Index? How to create clustered Index?

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.

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!
ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..
My Blogs - https://code-sample.com and https://code-sample.xyz
My Book1 - BEST SELLING ANGULAR BOOK (INCLUDING ALL VERSIONS 2, 4, 5, 6, 7)
My Book2 - ANGULAR 2 INTERVIEW QUESTIONS BOOK - Both Books are Available on WorldWide.

www.code-sample.com/. Powered by Blogger.