Teradata DATATYPES , RANGE and STORAGE SPACE

teradata

Teradata supports so many datatypes for columns in table. Some of them are standard ANSI datatypes and some Teradata extension to SQL. Below is the list of few very common DATATYPES used in TERADATA with the range for acceptable values and storage space it requires.

DATATYPERANGESPACE (BYTE)STANDARD
NUMERICDECIMAL(m,n)
n= 1 to 38
m= 0 to n
1 TO 2 –> 1
3 TO 4 –> 2
5 TO 9 –> 4
10 TO 18 –> 8
19 TO 38 –> 16
ANSI
DECIMALDECIMAL(m,n)
n= 1 to 38
m= 0 to n
1 TO 2 –> 1
3 TO 4 –> 2
5 TO 9 –> 4
10 TO 18 –> 8
19 TO 38 –> 16
TD
REAL2.26*(10)^-308 TO 1.797*(10)^3088ANSI
DOUBLE PRECISION2.26*(10)^-308 TO 1.797*(10)^3088ANSI
FLOAT2.26*(10)^-308 TO 1.797*(10)^3088TD
BYTEINT-128 TO 1271TD
SMALLINT-32768 TO 327672ANSI
INTEGER-2147483648 TO 21474836474ANSI
BIGINT-9223372036854775808 TO 92233720368547758078ANSI
DATE 4ANSI
TIME 6TD
TIMESTAMP 10TD
TIME WITH TIME ZONE 8ANSI
TIMESTAMP WITH TIME ZONE 12ANSI
PERIOD DATE 8TD
PERIOD TIME 12TD
PERIOD TIME WITH TIME ZONE 16TD
PERIOD TIMESTAMP 20TD
PERIOD TIMESTAMP WITH TIME ZONE 24TD
CHAR64000n where n is no of digitsANSI
VARCHAR64000n+2 where n is no of digitsANSI

Leave a Reply

Your email address will not be published. Required fields are marked *