INDEX constraint are used to speed up data retrieval from database table. To create
INDEX in MySQL, CREATE INDEX statement is used to create indexes in tables. MySQL allows to create multiple-column
To create indexes in tables using CREATE INDEX statement, use the following syntax:
indexname: Name of the INDEX, you want to create.
tablename: The table name from which you want to fetch records.
col1: The column name on which you want to create index.
INDEXon "custId" column for "tblCustomer" table:
CREATE UNIQUE INDEXstatement, use the following syntax:
UNIQUE INDEXon "custId" column for "tblCustomer" table:
INDEXconstraint "idex_custId" from "tblCustomer" table: