Indices

1 min read Updated Tue Apr 28 2026 07:56:31 GMT+0000 (Coordinated Universal Time)

Refer to Indexing before continuing. Primary key is indexed by default.

Example

CREATE INDEX idx_employee_name ON Employees (LastName, FirstName);

Here:

  • idx_employee_name is the name of the index.
  • Employees is the table on which the index is created.
  • LastName and FirstName are the columns included in the index.

This index speeds up queries filtering or sorting by LastName and FirstName.