All Forums General
dr.murthy_td 7 posts Joined 06/13
11 Jul 2014
How to use reserved key words as column names

Hi ,
I have to use the Teradata reserved key word "DEC" as a column name in my calender table, If i specify this word in double quotes(" DEC ") working fine.
Any alternative way to use this with out Quotes??

D N Murthy
dnoeth 4628 posts Joined 11/04
11 Jul 2014

You should try to avoid reserved names as you have to use those double quotes whenever that column is used in any SQL.


david.craig 73 posts Joined 05/13
11 Jul 2014

You could also use the Unicode Delimited Identifier syntax:
ct calendar (U&"DEC" uescape '#' char (10));
 *** Table has been created.
 *** Total elapsed time was 1 second.
But in your case, "DEC" is the best alternative.
See the SQL fundamentals reference for more details.

Raja_KT 1246 posts Joined 07/09
11 Jul 2014

As Dieter suggested to avoid using keywords as it breeds bigger problems in a bigger picture. A table like calendar can be used by others.It may create problems. Also if or when porting an application from one server to another it may create confusion.

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.