DROP [ONLINE|OFFLINE] INDEX [IF EXISTS] index_name ON tbl_name [WAIT n |NOWAIT]
DROP INDEX drops the index named
index_name from the table
This statement is mapped to an
ALTER TABLE statement to drop the
If another connection is using the table, a metadata lock is active, and this statement will wait until the lock is released. This is also true for non-transactional tables.
CREATE INDEX, allows the creation of an index.
To remove the primary key,
`PRIMARY` must be specified as index_name. Note that the quotes are necessary, because
PRIMARY is a keyword.
IF EXISTS clause is used, MariaDB will return a warning instead of an error if the index does not exist.