15.10 - object_name - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K
The name of the object to which you want to add a comment. You can add a comment to the following objects:
  • Parameter in a macro, SQL procedure, or user-defined function.
  • Column in a user base table or view.
  • Specific function, macro, file, profile, role, SQL procedure, base table, trigger, or view name contained by a database or user.
  • Database or user.
  • UDT.

    You can add a comment to a particular attribute of a structured UDT by specifying database_name.udt_name.attribute_name.

    The maximum size for attribute_name is 128 Unicode characters.

  • Method.

    If you specify a method, you must use its specific method name.

  • GLOP set.

    If no object kind keyword precedes the object name, then Teradata Database attempts to deduce the object from the level of qualification in the name. Use the fully qualified name if there is any ambiguity.

    Let x.y.z indicate the qualification hierarchy, with x being the highest, such as database or user, and z the lowest, such as parameter or attribute.

The following table shows the hierarchies for object_name.

Hierarchy level Object implied
x
  • database
  • user
x.y
  • base table
  • error table
  • GLOP set
  • hash index
  • join index
  • macro
  • profile
  • role
  • procedure
  • trigger
  • UDF
  • view

    within database x or user x.

x.y.z
  • macro parameter
  • procedure parameter
  • structured UDT attribute
  • table column
  • UDF parameter
  • view column

    within base table, error table, GLOP set, hash index, join index, macro, profile, role, procedure, trigger, UDF, or view y which, in turn, is within database x or user x.

database_name
The containing database for object_name if it is not contained by the current database or user.
user_name
The containing user for object_name if it is not contained by the current database or user.
‘comment’'
A description of the object.
Maximum string length is 255 characters from any supported client character sets.
An existing string can be changed by specifying a new string.
If you do not specify a string, any string previously stored is returned.
AS
IS
An optional keyword that introduces a clause defining a comment string.

Example: Commenting on a Hash Index

Suppose you have a hash index named OrdHIdx defined on the orders table in the accounting database.

You could type the following request to define a comment on the hash index OrdHIdx :

    COMMENT accounting.OrdHIdx AS 'hash index on Orders';

Because the object kind for this request is TABLE, representing a hash index, you are not required to specify TABLE for the object kind in the request.