15.00 - System-Derived and System-Generated Column Data Types - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

System-Derived and System-Generated Column Data Types

The following table lists the data types for several system‑derived and system‑generated column data types:

 

       Derived or
       Generated
         Column

                                                  Data Type

 

                  Default Title

 

OID

VARBYTE

None

ROWID

  • BYTE(10) for 2‑byte partitioning
  • BYTE(16) for 8‑byte partitioning
  •  

     

    None.

    There is no default title for the ROWID keyword because you cannot specify it in the select list of any DML request. You can only specify ROWID in a CREATE JOIN INDEX DDL request.

    Identity column

    Any of the following.

  • BYTEINT
  • DECIMAL(n,0)
  • The scale for a DECIMAL identity column must be 0.

  • INTEGER
  • NUMBER(n,0)
  • Only a fixed NUMBER type is permitted for identity columns, and its scale must be 0.

  • NUMERIC(n,0)
  • SMALLINT
  • BIGINT
  • The upper limits for DECIMAL and NUMERIC types are the following.

  • DECIMAL(18,0)
  • NUMERIC(18,0)
  • This is true even when the DBS Control flag MaxDecimal is set to 38 (see SQL Data Types and Literals).

    You can define an identity column with more than 18 digits of precision, or even as a BIGINT or NUMBER(n,0) type, without the CREATE TABLE or ALTER TABLE request aborting, but the values generated by Teradata Database for the identity column remain limited to the DECIMAL(18,0) type and size.

    A table that is managed by Unity Director cannot have an identity column. Unity Director instead uses its own mechanism to generate “identity column” values. See the Unity Director documentation for details.

    Default title for the column designated as an identity column.

    PARTITION

    INTEGER

    PARTITION

    PARTITION#Ln

  • INTEGER for the 2‑byte form of PPI.
  • BIGINT for the 8‑byte form of PPI.
  • PARTITION#Ln