How to include a regular index in a table definition:
mysql>
mysql> CREATE TABLE Orders
-> (
-> OrderID SMALLINT UNSIGNED NOT NULL,
-> ModelID SMALLINT UNSIGNED NOT NULL,
-> PRIMARY KEY (OrderID),
-> INDEX (ModelID)
-> );
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql> drop table Orders;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category