DROP INDEX

SQL DROP INDEX Keyword

The DROP INDEX command is used to delete an index in a table. Indexes help speed up queries, but sometimes you may need to remove them if they are no longer needed or are affecting performance during updates or inserts.

Tutorials dojo strip

SQL DROP INDEX Syntax

DROP INDEX index_name

SQL DROP INDEX Example (SQLite)

Firts create the index inside a table.

CREATE INDEX idx_patient_lastname
ON Patients (last_name);

Then drop the index from the table.

DROP INDEX idx_patient_lastname;

SQL DROP INDEX Example (MS Access)

DROP INDEX index_name ON table_name;

SQL DROP INDEX Example (SQL Server)

DROP INDEX table_name.index_name;

SQL DROP INDEX Example (DB2 / Oracle)

DROP INDEX index_name;

SQL DROP INDEX Example (MySQL)

ALTER TABLE table_name
DROP INDEX index_name;

SQL DROP INDEX Labs

Tutorials dojo strip
Scroll to Top