DROP INDEX
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Statements for MariaDB Xpand
Topics on this page:
Overview
Deletes an index from the table.
USAGE
Common Syntax:
DROP INDEX [IF EXISTS] <index_name> ON <table_name>
Supported Syntax:
DROP INDEX [IF EXISTS] <index_name> ON <table_name>
The IF EXIST
clause is available starting with Xpand 6.
EXAMPLES
DROP INDEX
To delete an index for a table in the currently selected database:
DROP INDEX idx1 ON tbl1;
The built-in function DATABASE()
returns the currently selected database.
To explicitly specify a database and a table from which to delete an index, use the DATABASE_NAME.TABLE_NAME
notation:
DROP INDEX idx1 ON db1.tbl1;