16.20 - data_type - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

The data type for constraint_name.

The data type you specify becomes the data type of the associated system-created constraint column in any table to which the constraint is assigned.

For detailed information about the uses of the SMALLINT and BYTE data types when designing classification systems and security constraints, see "Implementing Row Level Security” in Teradata Vantage™ NewSQL Engine Security Administration, B035-1100.

SMALLINT
Use the SMALLINT data type only for hierarchical (level) constraints.
The range of valid constraint values is from 1 to 10,000 inclusive.
BYTE(n)
Use the BYTE(n) data type only for non-hierarchical (category) constraints.
n represents the number of bytes in the constraint value string for a table row. If you do not specify a value for n, the default is 1 byte. The maximum value for n is 32.
To allow for more categories than the column could otherwise contain, the system automatically expresses each non-hierarchical value as a unique bit position, which allows a table row to contain up to 256 distinct values for the constraint column.