SQL fundamentals learning path Level 2 This level · 1 of 7
Medium sql database

What is stored in a nonclustered index?

A nonclustered index has a separate structure from the table. Its entries contain the index key values and a row locator pointing to the base-table row. On a heap, that locator is a row identifier; on a clustered table, it is the clustered index key.

CREATE NONCLUSTERED INDEX IX_Orders_Customer ON Orders(customer_id);
-- leaf stores customer_id plus a locator (clustered key, or a RID on a heap)
Sources (2)
  1. Microsoft Learn — nonclustered index row locatorslearn.microsoft.com
  2. Microsoft Learn — nonclustered index architecturelearn.microsoft.com
Previous
Next