Drop Statement

The objects created can be removed provided the authorization permissions are set.

drop_statement:
     DROP ALL AGGREGATE qname [ RESTRICT | CASCADE ]
   | DROP ALL [ FILTER ] FUNCTION qname [ RESTRICT | CASCADE ]
   | DROP ALL LOADER qname [ RESTRICT | CASCADE ]
   | DROP ALL PROCEDURE qname [ RESTRICT | CASCADE ]
   | DROP ALL WINDOW [ FUNCTION ] qname [ RESTRICT | CASCADE ]
   | DROP AGGREGATE [ IF EXISTS ] qname [ '(' [ data_type ','... ] ')' ] [ RESTRICT | CASCADE ]
   | DROP [ FILTER ] FUNCTION [ IF EXISTS ] qname [ '(' [ data_type ','... ] ')' ] [ RESTRICT | CASCADE ]
   | DROP INDEX qname
   | DROP LOADER [ IF EXISTS ] qname [ '(' [ data_type ','... ] ')' ] [ RESTRICT | CASCADE ]
   | DROP PROCEDURE [ IF EXISTS ] qname [ '(' [ data_type ','... ] ')' ] [ RESTRICT | CASCADE ]
   | DROP ROLE qname
   | DROP SCHEMA [ IF EXISTS ] name [ RESTRICT | CASCADE ]
   | DROP SEQUENCE qname
   | DROP TABLE [ IF EXISTS ] qname [ RESTRICT | CASCADE ]
   | DROP TRIGGER [ IF EXISTS ] qname
   | DROP TYPE qname [ RESTRICT | CASCADE ]
   | DROP USER ident
   | DROP VIEW [ IF EXISTS ] qname [ RESTRICT | CASCADE ]
   | DROP WINDOW [ FUNCTION ] [ IF EXISTS ] qname [ '(' [ data_type ','... ] ')' ] [ RESTRICT | CASCADE ]

drop schema:
 DROP SCHEMA [ IF EXISTS ] schema_name [ drop_action ]

drop_action:
 RESTRICT | CASCADE

You cannot drop a schema if it contains objects (e.g. tables, views, functions or procedures, except comments). Use option CASCADE to specify to also drop those referencing objects. The default behavior is RESTRICT. System schemas (sys, tmp, profiler, json) can not be dropped as they are needed by the system.

If you do not specify the full signature of the function the DROP statement will successfully execute if there is only one function with this name, if not the query is aborted. The DROP ALL is used to drop all the functions with the name specified in the statement.

Use option CASCADE to specify to also drop referencing objects. System functions can not be dropped as they are part by the system.