SQL Create Index

This page explains how to create an index using SQL.

Indexes can be created against a table to make searches more efficient. A database index is similar to an index of a book — a book index allows you to find information without having to read through the whole book. A database index enables the database application to find data quickly without having to scan the whole table.

Indexes can have a slight impact on performance so you should only create indexes against tables and columns that will be frequently searched against.

For example, if users of your application often search against the LastName field then that field is a great candidate for an index.

You create an index using the CREATE INDEX command.

SQL syntax

Example