COMMENT

statementsupportedDatabases & schemas

docs.snowflake.com ↗

Adds a comment or overwrites an existing comment for an existing object. Comments can be added to all objects (users, roles, warehouses, databases, tables, and so on). You can also use this command to add comments to individual table columns, but not to constraints on columns.

Syntax

supportedpartialnot supportednot scored

COMMENT [ IF EXISTS ] ON <object_type> <object_name> IS '<string_literal>';

COMMENT [ IF EXISTS ] ON COLUMN <table_name>.<column_name> IS '<string_literal>';

Parameters

NameRequiredDescription
ON object_type object_nameAdds a comment to the object of the specified type (for example, TABLE, SCHEMA, VIEW, and so on) with the specified identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. For more information, see Identifier requirements.
ON COLUMN table_name.column_nameAdds a comment to the specified table column. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. For more information, see Identifier requirements.
IS string_literalSpecifies the comment to add. Default: NULL

Usage notes