DROP NAMESPACE
Eon Mode only
DROP NAMESPACE removes a non-default namespace and all of its metadata. The statement errors if the namespace contains any schemas or tables. This statement applies to namespaces created with both CREATE NAMESPACE and CREATE ICEBERG NAMESPACE.
Syntax
DROP NAMESPACE [ IF EXISTS ] namespace_name
Note
Use DROP NAMESPACE to drop any non-default namespace, including namespaces created with the CREATE ICEBERG NAMESPACE statement. No separate drop statement is required for Iceberg namespaces.Arguments
IF EXISTS- Do not report an error if the namespace does not exist. Use this clause in SQL scripts to avoid errors on dropping non-existent objects before attempting to create them.
name- Name of the namespace to drop.
The namespace can be a standard namespace or an Iceberg namespace created with CREATE ICEBERG NAMESPACE. You cannot drop the
default_namespace. The statement fails if the namespace contains any schemas or tables. For Iceberg namespaces, this includes any schemas, Iceberg tables, or other catalog objects registered in the namespace. You must drop all dependent objects before dropping the namespace.
Privileges
Superuser
Examples
Drop the analytics namespace:
=> DROP NAMESPACE analytics;
DROP NAMESPACE
Drop an Iceberg namespace:
=> DROP NAMESPACE iceberg_ns;
DROP NAMESPACE