One-Dimensional (1-D) ARRAY Data Type | Data Types & Literals | Teradata Vantage - One-Dimensional (1-D) ARRAY 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™

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 “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.