CIW Course Revision Site

SQL - DROP Statement

CIW Course in a Nutshell

SQL, DROP Statement

The DROP Statement is used to delete objects. This applies to databases, tables and indexes. They are all simple statements and should all be used with care as there is no undo feature in SQL.

DROP DATABASE

Used to remove a database in it's entirety, including all tables, data, indexes and procedures containe therein.

DROP DATABASE db_name

See MySQL manual for full DROP DATABASE syntax

DROP TABLE

Used to delete a named table from the database, which will delete all data, indices and procedure contained within it.

DROP TABLE TableName

DROP TABLE Table1, Table2

See MySQL Manual for full DROP TABLE syntax

DROP INDEX

Used to remove an index from a names table.

DROP INDEX IndexName ON Tablename

See MySQL manual for full DROP INDEX syntax.

Design by Fife Web Design

Certified Internet Webmaster

Page last Edited: 09 May 2006