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

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

Represents a fixed-length binary string.

Syntax

BYTE [ ( n ) ] [ attributes [...] ]
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));