SQL DROP INDEX, DROP TABLE, and DROP DATABASE
Indexes, tables, and databases can easily be deleted/removed with the DROP statement.
The DROP INDEX Statement
The DROP INDEX statement is used to delete an index in a table.
DROP INDEX Syntax for MS Access:
DROP INDEX Syntax for MS SQL Server:
DROP INDEX Syntax for DB2/Oracle:
DROP INDEX Syntax for MySQL:
The DROP TABLE Statement
The DROP TABLE statement is used to delete a table.
The DROP DATABASE Statement
The DROP DATABASE statement is used to delete a database.
The TRUNCATE TABLE Statement
What if we only want to delete the data inside the table, and not the table itself?
Then, use the TRUNCATE TABLE statement:
Thank You For Helping Us!
Your message has been sent to W3Schools.