SMALLINT Data Type | Data Types and Literals | Teradata Vantage - SMALLINT Data Type - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantage™

Represents a signed binary integer value in the range -32768 to 32767.

Syntax

SMALLINT [ 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

    SMALLINT values are stored as two bytes, with the least significant byte first.

  • External Representation of SMALLINT

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

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

    Client CPU Architecture Client Representation
    IBM mainframe Two byte 16-bit signed 2’s complement binary number, most significant byte first.
    • UTS
    • RISC
    • Motorola 68000
    • WE 32000
    Two byte 16-bit signed 2’s complement binary number, most significant byte first.
    Intel Two byte 16-bit signed 2’s complement binary number, least significant byte first.
  • Format

    For information on the default display format, see Data Type Default Formats.

Example: SMALLINT Data Type

In the following table definition, column DeptNo is a SMALLINT data type:

CREATE TABLE Departments
  (DeptNo SMALLINT FORMAT '999' BETWEEN 100 AND 900
  ,ManagerName CHAR(26)
  ,ManagerID CHAR(9));