CREATE CATALOG (Databricks SQL)
Preview
Unity Catalog is in Public Preview. To participate in the preview, contact your Databricks representative.
Creates a catalog with the specified name. If a catalog with the same name already exists, an exception is thrown.
Parameters
-
The name of the catalog to be created.
IF NOT EXISTS
Creates a catalog with the given name if it does not exist. If a catalog with the same name already exists, nothing will happen.
comment
An optional
STRING
literal. The description for the catalog.
Examples
-- Create catalog `customer_cat`. This throws exception if catalog with name customer_cat
-- already exists.
> CREATE CATALOG customer_cat;
-- Create catalog `customer_cat` only if catalog with same name doesn't exist.
> CREATE CATALOG IF NOT EXISTS customer_cat;
-- Create catalog `customer_cat` only if catalog with same name doesn't exist, with a comment.
> CREATE CATALOG IF NOT EXISTS customer_cat COMMENT 'This is customer catalog';