15.10 - data_type - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
Release Number
December 2015
Content Type
Programming Reference
Publication ID
English (United States)

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 Security Administration.

Use the SMALLINT data type only for hierarchical (level) constraints.
The range of valid constraint values is from 1 to 10,000 inclusive.
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.