DROP DATABASE
syntax
DROP DATABASE [IF EXISTS] db_name
DROP DATABASE
drops all tables in the database and deletes the database. Be VERY careful with this command!
DROP DATABASE
returns the number of files that were removed from the database directory. Normally, this is three times the number of tables, because each table corresponds to a `.MYD' file, a `.MYI' file and a `.frm' file.
In MySQL 3.22 or later, you can use the keywords IF EXISTS
to prevent an error from occurring if the database doesn't exist.
You can also drop databases with mysqladmin
. See section 14.1 Overview of the different MySQL programs.