COMMENT Statement

The COMMENT statement adds, changes, or removes a comment about a database, a table, or a column.

You can alternatively use the CREATE and ALTER statements to add comments to the objects.

You can view the comment on a database, a table, or a column using the SHOW or DESCRIBE statement.

Syntax:

COMMENT ON DATABASE db_name IS {'comment' | NULL}
COMMENT ON TABLE [db_name.]table_name IS {'comment' | NULL}
COMMENT ON COLUMN [db_name.]table_name.column_name IS {'comment' | NULL}

Parameters:

Privileges required:

To add a comment, the ALTER privilege on the object is required.

To view a comment, the SELECT, INSERT, or REFRESH on the object is required.

Usage notes:

Added in: Impala 3.1