CREATE [UNIQUE] INDEX|KEY indexName ON tableName (columnName1 [ASC|DESC] [, columnName2 [ASC|DESC]]...)
CREATE INDEX customerID ON orders (customerID);
CREATE UNIQUE INDEX emailAddress ON customers (emailAddress);
CREATE UNIQUE INDEX customerIDorderNumber ON orders (customerID, orderNumber);
CREATE INDEX orderTotal ON orders (orderTotal DESC);
CREATE TABLE
statement that also creates indexesCREATE TABLE customers ( customerID INT NOT NULL AUTO_INCREMENT, emailAddress VARCHAR(255) NOT NULL, firstName VARCHAR(60)NOT NULL, PRIMARY KEY (customerID), UNIQUE INDEX emailAddress (emailAddress), INDEX firstName (firstName) );
DROP INDEX
statement that drops an indexDROP INDEX firstName ON customers;
CREATE TABLE
statement to create indexes for a table.CREATE INDEX
statement to add an index to a table.DROP INDEX
statement to drop an index.