COMMENT ON
Sets a comment on a catalog, schema, table, or view.
To set the comment of a table column, use ALTER TABLE.
Required permissions
If you use Unity Catalog you must have MODIFY
permission to set the comment on a VIEW
or TABLE
, and ownership to set the comment on a SCHEMA
or CATALOG
.
Syntax
COMMENT ON { CATALOG catalog_name |
{ SCHEMA | DATABASE } schema_name |
TABLE table_name } IS comment
Parameters
-
The name of the catalog where your comment appears.
-
The name of the schema where your comment appears.
-
The name of the table you comment on. The name must not include a temporal specification.
comment
A STRING literal or
NULL
. If you specifyNULL
any existing comment is removed.