BYTE Data Type - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantageā„¢ Data Types and Literals

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

Purpose

Represents a fixed-length binary string.

Syntax



n
The number of bytes in the string.
The maximum value for n is 64000.
attributes
Appropriate data type, column storage, or column constraint attributes.
See Core Data Type Attributes and Storage and Constraint Attributes for specific information.

ANSI Compliance

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

External Representation of BYTE

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

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

Client CPU Architecture Client Internal Data Format
IBM mainframe n bytes.
  • UTS
  • RISC
  • Motorola 68000
  • WE 32000
  • Intel
n bytes.

Usage Notes

If no value is specified for n, the default is BYTE(1).

Example: BYTE Data Type

In the following example, the column named BinaryData is assigned the BYTE data type and has an upper limit of 1200 bytes:

CREATE TABLE DocTable
  (DocType INTEGER
  ,DocName CHAR(26)
  ,BinaryData BYTE(1200));