Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add comments to existing table DDL in Teradata?

Tags:

ddl

teradata

I am adding some new columns to a table and want to add documentation to the table DDL for future developers. How does one go about this?

like image 546
oscilatingcretin Avatar asked Feb 12 '13 14:02

oscilatingcretin


1 Answers

Generic Syntax:

COMMENT ON {OBJECT} {OBJECTNAME} AS '{255 characters of text};

Detailed Syntax Examples:

COMMENT ON TABLE {DATABASE}.{TABLENAME} AS '{255 characters of text}';
COMMENT ON COLUMN {DATABASENAME}.{TABLENAME}.{COLUMNNAME} AS '{255 characters of text}';
COMMENT ON USER {USERNAME} AS '{255 characters of text}';
COMMENT ON DATABASE {DATABASENAME} AS '{255 characters of text}';
like image 183
Rob Paller Avatar answered Oct 14 '22 06:10

Rob Paller