COMMENT ON TABLE COLUMN
Adds, revises, or removes a table column comment.
Adds, revises, or removes a table column comment. Each object can have one comment. Comments are stored in the system table
COMMENTS
.
Syntax
COMMENT ON COLUMN [[database.]schema.]table.column IS {'comment' | NULL}
Parameters
[
database
.]
schema
Database and schema. The default schema is
public
. If you specify a database, it must be the current database.table
.
column
- The name of the table and column with which to associate the comment.
comment
- Specifies the comment text to add. If a comment already exists for this column, this comment overwrites the previous comment.
Comments can be up to 8192 characters in length. If a comment exceeds that limitation, Vertica truncates the comment and alerts the user with a message.
NULL
- Removes an existing comment.
Privileges
Non-superuser: object owner
Examples
The following example adds a comment to the transaction_time
column in the store_sales_fact
table in the store
schema:
=> COMMENT ON COLUMN store.store_sales_fact.transaction_time IS 'GMT';
The following example removes a comment from the transaction_time
column in the store_sales_fact
table in the store
schema:
=> COMMENT ON COLUMN store.store_sales_fact.transaction_time IS NULL;