drop database argument: Drop a database (SQL administration API)

Use the drop database argument with the admin() or task() function to drop a database.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+--(--"drop database"-------------->
                     '-task--'                       

>--,--"database_name"--)--;------------------------------------><

Element Description Key Considerations
database_name The name of the database.  

Usage

This function is equivalent to the DROP DATABASE statement. This function deletes the entire database, including all of the system catalog tables, objects, and data.

Example

The following example drops the database named demodbs:
EXECUTE FUNCTION task("drop database","demodbs");
     

Copyright© 2019 HCL Technologies Limited