One-Dimensional (1-D) ARRAY Data Type | Data Types & Literals | Teradata Vantage - 17.10 - One-Dimensional (1-D) ARRAY Data Type - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

The 1-D ARRAY type is defined as a variable-length ordered list of values of the same data type. It has a maximum number of values that you specify when you create the ARRAY type. You can access each element value in a 1-D ARRAY type using a numeric index value. For more information on referencing an ARRAY element, see Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates, B035-1145.

SQL Engine stores the element values of a 1-D ARRAY sequentially starting with the first element, from left-to-right.

The 1-D ARRAY type is compatible with the VARRAY type provided by Oracle Database except for the following areas:
  • The syntax for ARRAY methods that have zero parameters requires an empty set of parenthesis.
  • Some methods that provide the same functionality as methods defined for Oracle VARRAY types have slightly different names in Teradata. For example, Oracle provides the FIRST method, but Teradata provides the OFIRST method. The renaming was done to avoid conflicts with Teradata reserved words.
  • Vantage provides a set of methods that have the same functionality as some methods defined for Oracle VARRAY types. However, not all methods defined for Oracle VARRAY types are available for Teradata ARRAY types.
  • The ALTER TYPE statement is not supported for Teradata ARRAY types. It is supported for Oracle VARRAY types.