Create index on two columns
mysql>
mysql>
mysql> CREATE TABLE MATCHES
-> (MATCHNO INTEGER NOT NULL,
-> TEAMNO INTEGER NOT NULL,
-> EmployeeNO INTEGER NOT NULL,
-> WON SMALLINT NOT NULL,
-> LOST SMALLINT NOT NULL,
-> PRIMARY KEY (MATCHNO) );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql> CREATE INDEX MAT_WL
-> ON MATCHES (WON, LOST);
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
mysql> drop table matches;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category