Previous Topic: When to UseNext Topic: Deleting Tables


Deleting a Database

Use the DELETE option to remove an entire database. If any tables still exist in the database to be deleted, those tables are deleted. Prior to Version 11.0 if any tables were left in a database, the delete of that database would fail, but beginning with Version 11.0, it is no longer necessary to delete table definitions in a database separately before deleting that database, even though it is still possible to do so.

To remove a database using CXXMAINT DELETE, the database must not currently be open. If the database is open with no users, close the database, then issue the delete.

Note: A virtual database that is open cannot be closed, and therefore it cannot be deleted.