All Forums Database
veskojl 12 posts Joined 04/12
20 Feb 2013
Add comment on a COLUMN or TABLE

Hi,
I'm trying to add a comment whithin the CREATE TABLE ddl. I've check that Teradata supports comments  via statements of the type:

COMMENT ON COLUMN table.col 'A comment!'

but the problem is SQL Assistand doesn't "visualize" them when I get the table ddl from the "Show Definition" menu.
My question is there a tricky way to add such comments to columns/tables, so they stay bounded to the table DDL?!
Something like the MySQL comment clause:

CREATE TABLE test(
id INT COMMENT 'This is the ID!'
)

 
 

mohan.mscss 31 posts Joined 04/11
20 Feb 2013

if you just need it in the query then use double hypen to put comments
ct dummy(
int a --value of a
,int b -- value of b
)
But make sure, the comma has to be on the next line :-). .
Regards,
Mohan K

veskojl 12 posts Joined 04/12
20 Feb 2013

I've just realized that adding regular comments will do the trick.

CREATE TABLE test(
id INT /* This is the ID! */
)

 

You must sign in to leave a comment.