CREATE INDEX Statement Example

This example creates an index consisting of the fields Home Phone and Extension in the Employees table.

CREATE INDEX NewIndex ON Employees (HomePhone, Extension);

This example creates an index on the Customers table using the CustomerID field. No two records can have the same data in the CustomerID field, and no Null values are allowed.

CREATE UNIQUE INDEX CustID ON Customers (CustomerID) WITH DISALLOW NULL;