SQLAdvanced#indexes

Clustered vs non-clustered index?

A clustered index defines the physical order of the table rows, so there is only one per table. A non-clustered index is a separate structure holding key values plus a pointer to the row; a table can have many.

Example
-- SQL Server
CREATE CLUSTERED INDEX ix_orders_id ON orders(id);
CREATE NONCLUSTERED INDEX ix_orders_date ON orders(order_date);

Related Questions

1
SQLAdvanced#indexes#performance

What is a covering index?

Open
2
SQLAdvanced#indexes#performance

Why might an index not be used by a query?

Open
3
SQLIntermediate#subqueries

What is a subquery? Correlated vs non-correlated?

Open