DROP INDEX
This page is part of MariaDB's MariaDB Documentation.
The parent of this page is: SQL Statements for MariaDB Xpand
Topics on this page:
Overview
Deletes an index from the table.
See also: SQL Statements for MariaDB Xpand 6.1, in 6.0, and in 5.3
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;
RELATED TOPICS
CHANGE HISTORY
Release Series | History |
---|---|
6.1 |
|
6.0 |
|
5.3 |
|