SQL Data Types - Teradata Database

Database Introduction

Product
Teradata Database
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata® Database

Every data value belongs to an SQL data type. For example, when you define a column in a CREATE TABLE statement, you must specify the data type of the column. Teradata Database supports the following categories of data types. For a complete list of supported data types and detailed information about each data type, see SQL Data Types and Literals.

 

Data Type Category

Description

Data Type Examples

ARRAY/VARRAY

An ARRAY data type is used for storing and accessing multidimensional data. The ARRAY data type can store many values of the same specific data type in a sequential or matrix-like format.

  • One-dimensional (1-D) ARRAY
  • Multidimensional (n-D) ARRAY
  • Byte

    Byte data types store raw data as logical bit streams. These data types are stored in the client system format and are not translated by Teradata Database. The data is transmitted directly from the memory of the client system.

  • BYTE
  • VARBYTE
  • BLOB (Binary Large Object)
  • Character

    Character data types represent characters that belong to a given character set. These data types represent character data.

  • CHAR
  • VARCHAR
  • CLOB (Character Large Object)
  • DateTime

    DateTime data types represent date, time, and timestamp values.

  • DATE
  • TIME
  • TIMESTAMP
  • TIME WITH TIME ZONE
  • TIMESTAMP WITH TIME ZONE
  • Geospatial

    Geospatial data types represent geographic information and provides a way for applications that manage, analyze, and display geographic information to interface with Teradata Database.

  • ST_Geometry
  • MBR
  • Interval

    Interval data types represent a span of time. For example, an interval value can represent a time span that includes a number of years, months, days, hours, minutes, or seconds.

  • INTERVAL YEAR
  • INTERVAL YEAR TO MONTH
  • INTERVAL MONTH
  • INTERVAL DAY
  • INTERVAL DAY TO HOUR
  • INTERVAL DAY TO MINUTE
  • INTERVAL DAY TO SECOND
  • INTERVAL HOUR
  • INTERVAL HOUR TO MINUTE
  • INTERVAL HOUR TO SECOND
  • INTERVAL MINUTE
  • INTERVAL MINUTE TO SECOND
  • INTERVAL SECOND
  • JSON

    The JSON data type represents data that is in JSON (JavaScript Object Notation) format.

    JSON

    Numeric

    Numeric data types represent a numeric value that is an exact numeric number (integer or decimal) or an approximate numeric number (floating point).

  • BYTEINT
  • SMALLINT
  • INTEGER
  • BIGINT
  • DECIMAL/NUMERIC
  • FLOAT/REAL/DOUBLE PRECISION
  • NUMBER
  • Parameter

    Parameter data types are data types that can be used only with input or result parameters in a function, method, stored procedure, or external stored procedure.

  • TD_ANYTYPE
  • VARIANT_TYPE
  • Period

    A Period data type represents a time period, where a period is a set of contiguous time granules that extends from a beginning bound up to but not including an ending bound.

  • PERIOD(DATE)
  • PERIOD(TIME)
  • PERIOD(TIME WITH TIME ZONE)
  • PERIOD(TIMESTAMP)
  • PERIOD(TIMESTAMP WITH TIME ZONE)
  • UDT

    UDT (User-Defined Type) data types are custom data types that you define to model the structure and behavior of the data used by your applications.

  • Distinct
  • Structured
  • XML

    The XML data type represents XML content. The data is stored in a compact binary form that preserves the information set of the XML document, including the hierarchy information and type information derived from XML validation.

    XML

  • SQL Data Types and Literals
  • SQL Geospatial Types
  • Teradata JSON
  • Teradata XML
  • SQL Functions, Operators, Expressions, and Predicates