COMMENT ON (Databricks SQL)

Sets a comment on a schema, table, or view.

Syntax

COMMENT ON { CATALOG catalog_name |
             { SCHEMA | DATABASE } schema_name |
             TABLE table_name } IS comment

Parameters

  • catalog_name

    The name of the catalog where your comment appears.

  • schema_name

    The name of the schema where your comment appears.

  • table_name

    The name of the table you comment on. The name must not include a temporal specification.

  • comment

    A STRING literal or NULL. If you specify NULL any existing comment is removed.

Examples

> COMMENT ON CATALOG my_catalog IS 'This is my catalog';

> COMMENT ON SCHEMA my_schema IS 'This is my schema';

> COMMENT ON TABLE my_table IS 'This is my table';

> COMMENT ON TABLE my_table IS NULL;