DROPindexid_fname_lnameonemployee;QueryOK,0rowsaffected(0.30sec)Records:0Duplicates:0Warnings:0 It can be observed from the result set of the following query Deletion of UNIQUE index-mysql>showindexfromemployee;Emptyset(0">
Multi-column UNIQUE indexes can also be dropped just like we drop UNIQUE constraints from the table.
In this example, we have deleted a multi-column UNIQUE index on the table "employee" using the following query -
mysql> DROP index id_fname_lname on employee; Query OK, 0 rows affected (0.30 sec) Records: 0 Duplicates: 0 Warnings: 0
It can be observed from the result set of the following query Deletion of UNIQUE index-
mysql> show index from employee; Empty set (0.00 sec) mysql> describe employee; +------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+-------+ | empid | int(11) | YES | | NULL | | | first_name | varchar(20) | YES | | NULL | | | last_name | varchar(20) | YES | | NULL | | +------------+-------------+------+-----+---------+-------+ 3 rows in set (0.08 sec)
The above is the detailed content of How do we drop a multi-column UNIQUE index?. For more information, please follow other related articles on the PHP Chinese website!