SQL DROP INDEX, DROP TABLE, and DROP DATABASE
Drop statements make it easy to drop indexes, tables, and databases.
DROP INDEX statement
DROP INDEX statement is used to drop an index from 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:
DROP TABLE statement
DROP TABLE statement is used to drop a table.
DROP DATABASE statement
DROP DATABASE statement is used to delete a database.
TRUNCATE TABLE statement
If we only need to delete the data in the table, but not the table itself, what should we do?
Please use the TRUNCATE TABLE statement: