Applies to: Databricks SQL Databricks Runtime 10.3 and above Unity Catalog only
Drops a catalog. An exception is thrown if the catalog does not exist in the metastore. To drop a catalog you must be its owner.
If specified, no exception is thrown when the catalog does not exist.
The name of an existing catalog in the metastore. If the name does not exist, an exception is thrown.
If specified, restricts dropping a non-empty catalog. Enabled by default.
If specified, drops all of the associated databases (schemas) and the objects within them, recursively. In Unity Catalog, dropping a catalog using
CASCADEsoft-deletes tables: managed table files will be cleaned up after 30 days, but external files are not deleted.
-- Create a `vaccine` catalog > CREATE CATALOG vaccine COMMENT 'This catalog is used to maintain information about vaccines'; -- Drop the catalog and its schemas > DROP CATALOG vaccine CASCADE; -- Drop the catalog using IF EXISTS and only if it is empty. > DROP CATALOG IF EXISTS vaccine RESTRICT;