IF EXISTS
If the default database is dropped, the default database is unset (the
returns NULL).
If you use
DROP DATABASE
are deleted.
DROP DATABASE
files removed.
.frm
The
DROP DATABASE
that MySQL itself may create during normal operation:
• All files with the following extensions.
.BAK
.MYD
.db
• All subdirectories with names that consist of two hex digits 00-ff. These are subdirectories used for
tables. (These directories are not removed as of MySQL 5.0, when support for
RAID
was removed. You should convert any existing
before upgrading to MySQL 5.0. See
• The
db.opt
If other files or directories remain in the database directory after MySQL removes those just listed, the
database directory cannot be removed. In this case, you must remove any remaining files or directories
manually and issue the
You can also drop databases with mysqladmin. See
Administering a MySQL
13.1.14.
DROP FUNCTION
The
DROP FUNCTION
• For information about dropping stored functions, see
FUNCTION
• For information about dropping user-defined functions, see
Syntax".
13.1.15.
DROP INDEX
DROP INDEX
index_name
DROP INDEX
mapped to an
Syntax".
To drop a primary key, the index name is always PRIMARY, which must be specified as a quoted
identifier because
DROP INDEX `PRIMARY` ON t;
DROP FUNCTION
Important
When a database is dropped, user privileges on the database are not
automatically dropped. See
is used to prevent an error from occurring if the database does not exist.
on a symbolically linked database, both the link and the original database
returns the number of tables that were removed. This corresponds to the number of
statement removes from the given database directory those files and directories
.DAT
.MYI
.frm
file, if it exists.
DROP DATABASE
Server".
Syntax
statement is used to drop stored functions and user-defined functions (UDFs):
Syntax".
Syntax
ON
tbl_name
drops the index named
statement to drop the index. See
ALTER TABLE
is a reserved word:
PRIMARY
Syntax
Section 13.7.1.3,
.HSH
.TRG
.ibd
tables and remove these directories manually
RAID
Section 2.19.1.2, "Upgrading from MySQL 4.1 to
statement again.
Section 4.5.2,
Section 13.1.16,
from the table tbl_name. This statement is
index_name
1055
"GRANT
Syntax".
[960]
DATABASE()
.MRG
.TRN
.ndb
"mysqladmin
— Client for
"DROP PROCEDURE
Section 13.7.3.2,
"DROP FUNCTION
Section 13.1.4,
"ALTER TABLE
function
tables
RAID
5.0".)
and
DROP
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers