Skip to main content
Comments, text-based tags, can be applied to a variety of object types. Normally, comments are applied to objects after the object is created; however, comments can also be applied in-line to table columns within a CREATE TABLE or CREATE EXTERNAL TABLE statement.
COMMENT Syntax

Parameters

<object type>

Specifies the type of object to which the comment will be applied. The following types are supported:
TypeDescription
SCHEMAApply a schema-level comment; can be viewed in the ki_catalog.ki_schemas Kinetica catalog table
TABLEApply a table-level comment; can be viewed in the ki_catalog.ki_objects Kinetica catalog table
VIEWApply a view-level comment; can be viewed in the ki_catalog.ki_objects Kinetica catalog table
COLUMNApply a column-level comment; can be viewed in the ki_catalog.ki_columns Kinetica catalog table
PROCEDUREApply a procedure-level comment; can be viewed in the ki_catalog.ki_objects Kinetica catalog table
USERApply a user-level comment; can be viewed in the ki_catalog.ki_users_and_roles Kinetica catalog table
ROLEApply a role-level comment; can be viewed in the ki_catalog.ki_users_and_roles Kinetica catalog table

<object name>

Name of the object to which the comment will be applied; must adhere to the supported naming criteria

<comment text>

Text of the comment to apply.

Examples

For example, to apply a comment to a column in-line with the containing table creation:
In-Line Column Comment Example
To apply a comment to a column after the containing table is created:
Post-Creation Column Comment Example

List Comments

To list the comments for users & roles:
List User/Role Comments
To list the comments for schemas:
List Schema Comments
To list the comments for tables, views, & SQL procedures:
List Table/View/Procedure Comments
To list the comments for columns:
List Column Comments
To show the comments for columns within the context of the containing table, use SHOW TABLE on the table containing the columns.