How does clustered and non clustered index work?



How does clustered and non clustered index work?..

Answer / Amit Ghildiyal

{"clustered_and_non_clustered_index": [n {"name": "Clustered Index", "description": "The data is physically sorted based on the column values in the order specified. Only one clustered index can be created per table and it serves as a primary key."},n {"name": "Non-clustered Index", "description": "The data remains in its original location, but an additional structure is added to reference the rows with specific column values. A table can have multiple non-clustered indexes.", "example": [n {"query": "CREATE NONCLUSTERED INDEX idx_Name ON Table_Name (Column_Name)"},n {"query": "ALTER TABLE Table_Name ADD CONSTRAINT PK_Table_Name PRIMARY KEY CLUSTERED (Column_Name)"}n ]}n]}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is SQL Profiler and the use of it?

2 Answers   247Customer,


What is index fragmentation in ms sql server?

1 Answers  


What is the significance of master, tempdb and model databases?

1 Answers  


How to create a scrollable cursor with the scroll option?

1 Answers  


How to change the ownership of a schema in ms sql server?

1 Answers  


Normalization and denormalization

3 Answers   Wipro,


Do you know spatial data types - geometry and geography in sql server 2008?

1 Answers  


What do we have to check in database testing?

1 Answers  


What is transaction ? Give me one example.

11 Answers   Melstar, Wipro,


What is CTE in SQL

1 Answers   Infosys,


Describe in brief authentication modes in sql server.

1 Answers  


What is the difference between indexing and hashing?

1 Answers  


Categories