Teradata Variables DEFAULT VALUES ("WITH DEFAULT" OPTION)

Database
Teradata Employee

Teradata Variables DEFAULT VALUES ("WITH DEFAULT" OPTION)

Hi,

I need to know if theres a metadata table that contains the DEFAULT values that teradata uses when "WITH DEFAULT" option is included in table fields definition.

I need this because im making a SP that generates dynamic SQL and in some cases it has to use COALESCE and I need the default values to complete it.

If not, is there any table where I can get the Variable Type Name? for example, I know I can get from DBC.Columns the Data Type, but its coded, what I need is the actual name (For INTEGER the code name is "I" but I cant make a Dynamic CREATE TABLE with an INTEGER field using "I" to define it, I need the "INTEGER" word).

Thanks.
1 REPLY

Re: Teradata Variables DEFAULT VALUES ("WITH DEFAULT" OPTION)

For part 1 of your question, I dont think so.

For part 2, you can use type(columnname) to get the type.

e.g select type(10);

--> BYTEINT