Dropping databases
Dropping a database can have far-reaching effects, because this action deletes all its objects, containers, and associated files. The dropped database is removed (uncataloged) from the database directories.
Procedure
- To drop a database by using the command line, enter:
DROP DATABASE name
- To drop a database from a client application, call the sqledrpd API.
- To drop a database at a specified database partition server, call the sqledpan API.
- To drop a database using IBM® Data Studio, right-click the database and select the task assistant to drop the database.
Examples
The
following command deletes the database SAMPLE:
DROP DATABASE SAMPLE
Note: If
you drop the SAMPLE database and find that you need it again, you
can re-create it.