BYTEINT Data Type | Data Types and Literals | Teradata Vantage - BYTEINT Data Type - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
tpf1598412463935.ditamap
dita:ditavalPath
tpf1598412463935.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantage™

Represents a signed binary integer value in the range -128 to 127.

ANSI Compliance

BYTEINT is a Teradata extension to the ANSI SQL:2011 standard.

Syntax

BYTEINT [ attributes [...] ]

Syntax Elements

attributes
Appropriate data type attributes, column storage attributes, or column constraint attributes.
See Core Data Type Attributes and Storage and Constraint Attributes for specific information.

Usage Notes

  • Storage

    BYTEINT is stored as one byte.

  • External Representation of BYTEINT

    The following table lists the client representations for the BYTEINT data type.

    Determining the application definitions and client data types is the responsibility of the application programmer.

    Client CPU Architecture Client Representation
    IBM mainframe One byte 8-bit signed 2’s complement binary number.
    • UTS
    • RISC
    • Motorola 68000
    • WE 32000
    • Intel
    One byte 8-bit signed 2’s complement binary number.
  • Format

    BYTEINT format is described in Data Type Default Formats.

Example: BYTEINT Data Type

In the following table definition, column EdLev is a BYTEINT data type:

CREATE TABLE Education
  (Id CHAR(9)
  ,LastName CHAR(26)
  ,EdLev BYTEINT FORMAT 'Z9'
   CHECK (EdLev BETWEEN 0 AND 22) NOT NULL);