← Back to Articles         
Multiple Clustered Indexes?

Multiple Clustered Indexes?

Published on 17 Sep 2026     4 min read MS SQL
SQL Indexes

Can a Table Have Multiple Clustered Indexes?

No. A SQL Server table can have only one clustered index.

This is because the leaf level of a clustered index contains the actual table rows. The table’s data can be organized through only one clustered index structure at a time.

Simple Example

CREATE TABLE Employees
(
    EmployeeId INT,
    EmployeeName VARCHAR(100),
    Email VARCHAR(150)
);

Create a clustered index on EmployeeId:

CREATE CLUSTERED INDEX IX_Employees_EmployeeId
ON Employees(EmployeeId);

Now, trying to create another clustered index produces an error:

CREATE CLUSTERED INDEX IX_Employees_Email
ON Employees(Email);

SQL Server reports that the table already has a clustered index.

Why Is Only One Allowed?

A clustered index’s leaf pages contain the table’s actual rows, organized by its key.

For example:

Clustered index key: EmployeeId

EmployeeId
----------
101
102
103
104

If another clustered index were created on Email, the same data would need a second independent clustered organization:

Email
------------------
adam@example.com
john@example.com
syed@example.com

A single table cannot have two clustered index structures containing its actual rows simultaneously. Therefore, SQL Server permits only one.

More precisely, a clustered index defines the table’s B-tree and the key order used to navigate its leaf-level data pages. It does not guarantee that rows remain physically contiguous on disk.

Can a Clustered Index Contain Multiple Columns?

Yes. A table cannot have multiple clustered indexes, but its single clustered index can contain multiple columns. This is called a composite clustered index.

CREATE CLUSTERED INDEX IX_Orders_Customer_OrderDate
ON Orders(CustomerId, OrderDate);

Here:

  • The table has one clustered index.

  • The clustered index contains two key columns.

  • Rows are logically organized first by CustomerId, then by OrderDate.

This is different from having two separate clustered indexes.

Can a Table Have Multiple Nonclustered Indexes?

Yes. A table can have multiple nonclustered indexes because they are separate structures containing index keys and row locators.

CREATE NONCLUSTERED INDEX IX_Employees_Email
ON Employees(Email);

CREATE NONCLUSTERED INDEX IX_Employees_Name
ON Employees(EmployeeName);

CREATE NONCLUSTERED INDEX IX_Employees_Department
ON Employees(DepartmentId);

Each nonclustered index points to the table rows using:

  • The clustered-index key when the table has a clustered index

  • A Row Identifier (RID) when the table is a heap

Primary Key and Clustered Index

A primary key and a clustered index are not the same thing:

  • A primary key is a constraint that enforces uniqueness and disallows NULL.

  • A clustered index is an index structure used to organize and access table rows.

By default, SQL Server usually creates the primary key as clustered when no clustered index already exists.

CREATE TABLE Employees
(
    EmployeeId INT PRIMARY KEY,
    EmployeeName VARCHAR(100)
);

This normally creates a unique clustered index on EmployeeId.

However, you can explicitly make the primary key nonclustered and create the clustered index on another column:

CREATE TABLE Employees
(
    EmployeeId INT NOT NULL,
    EmployeeName VARCHAR(100),
    CreatedDate DATETIME2 NOT NULL,

    CONSTRAINT PK_Employees
        PRIMARY KEY NONCLUSTERED (EmployeeId)
);

CREATE CLUSTERED INDEX IX_Employees_CreatedDate
ON Employees(CreatedDate);

The table now has:

  • One nonclustered primary-key index on EmployeeId

  • One clustered index on CreatedDate

What Happens Without a Clustered Index?

A table without a clustered index is called a heap.

CREATE TABLE EmployeeLogs
(
    LogId INT,
    Message VARCHAR(500),
    CreatedDate DATETIME2
);

Until a clustered index is created, the table remains a heap.

A heap can still have multiple nonclustered indexes:

CREATE NONCLUSTERED INDEX IX_EmployeeLogs_CreatedDate
ON EmployeeLogs(CreatedDate);

In this case, the nonclustered index uses a physical row identifier called an RID to locate rows in the heap.

Choosing a Good Clustered-Index Key

A good clustered-index key should generally be:

  • Narrow

  • Unique

  • Stable

  • Ever-increasing when appropriate

  • Frequently used for range queries

Example:

EmployeeId INT IDENTITY(1,1)

This is commonly suitable because it is narrow, unique and increasing.

Avoid using a wide or frequently changing column as the clustered key because the clustered key is also stored in nonclustered indexes as the row locator.

For example, a large VARCHAR column is usually a poor clustered key:

CREATE CLUSTERED INDEX IX_Employees_Email
ON Employees(Email);

It may make all nonclustered indexes larger.

Key Points

  • A table can have only one clustered index.

  • The clustered index’s leaf level contains the actual data rows.

  • A clustered index can contain multiple columns.

  • A table can have multiple nonclustered indexes.

  • A table without a clustered index is called a heap.

  • A primary key does not always need to be clustered.

  • SQL Server normally creates the primary key as clustered only when another clustered index does not already exist.

  • Choose a narrow, stable and preferably unique clustered key.

Interview answer: No, a table cannot have multiple clustered indexes because the leaf level of a clustered index contains the table’s actual data rows, and a table can have only one clustered B-tree organization. However, that single clustered index can be composite, and the table can have multiple nonclustered indexes.

← Back to Articles