Retrieves a previously placed comment on a database object or definition.
where:
Syntax Element … |
Specifies … |
object_kind_1 |
a mandatory database object kind specification. The valid specifications for object_kind_1 are not all database objects. Triggers and views, for example, are definitions of actions or conceptual groups rather than database objects. You must specify the following database object kinds to retrieve a comment for the kind of object they represent. |
object_kind_2 |
an optional database object kind specification. You can specify the following database object kinds to retrieve a comment for the kind of object they represent, but they are optional. The semantics of the COMMENT statement require that if you specify an object kind, you must specify the keyword TABLE for any hash or join index whose comment you want to retrieve; however, because TABLE is not a mandatory object kind specification, you are not required to specify it. If you omit the object_kind when you retrieve a comment for a file, the object_name must contain the whole path to the file, for example, dbname.uifname. |
database_name | user_name |
the containing database or user for object_name if it is not contained by the current database or user. You cannot specify a database name or user name if object_kind is GROUP. For the rules to use in naming database objects, see SQL Fundamentals. |
object_name |
the name of the object for which a comment is to be retrieved, including: If you do not precede the object name with an object kind keyword, the system attempts to deduce the object from the level of qualification in the name. Use the fully‑qualified name to avoid ambiguity. Let x.y.z indicate the qualification hierarchy, with x being the highest, or coarsest grained, level and z the lowest, or most finely grained. |
object_name (continued) |
If you specify a hierarchy level of x, the specified object is implied to be one of the following: If you specify a hierarchy level of x.y, the specified object is implied to be one of the following: If you specify a hierarchy level of x.y.z, the specified object is implied to be one of the following: |
COMMENT is a Teradata extension to the ANSI SQL:2011 standard.
None.
None.
These rules apply to using the comment‑retrieving form of the COMMENT statement:
You can specify a COMMENT (Comment‑Retrieving Form) request at any point within the boundaries of an explicit transaction in Teradata session mode.
IF you … |
THEN the system … |
specify a comment string |
does one of the following things: |
do not specify a comment string |
does one of the following things: |