16.20 - One-Dimensional (1-D) ARRAY Data Type - Teradata Vantage NewSQL Engine

Teradata Vantage™ Data Types and Literals

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

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 details on referencing an ARRAY element, see “ARRAY Functions and Operators” in Teradata Vantage™ SQL Functions, Expressions, and Predicates, B035-1145.

Teradata Database 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.
  • Teradata Database 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.