Multidimensional Array - Oracle-Compatible Form - Teradata Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Database
Release Number
20.00
Published
June 2025
ft:locale
en-US
ft:lastEdition
2026-09-23
dita:mapPath
mbm1747160743883.ditamap
dita:ditavalPath
jlp1749501702948.ditaval
dita:id
mdr1472255012272
lifecycle
latest

You must specify a minimum of 2 dimensions for a multidimensional VARRAY type. The maximum number of dimensions you can specify is 5.

A multidimensional VARRAY can have a maximum size of 64,256 bytes. The auto-generated transform string for the VARRAY can have a maximum size of 64,256 bytes. The size of an auto-generated transform string for the VARRAY is limited to the maximum size of a DBS VARCHAR type. The overall limit on the number of elements is dependent on the size of the elements and the size of the transform. For details on how the size of the transform is calculated, see Data Types and Literals, B035-1143.

SYSUDTLIB
The optional name of the containing database for array_type name.
The only valid database name is SYSUDTLIB.
array_type_name
The name of the multidimensional VARRAY type to be created.
If the UDF library for your database contains any objects with multibyte characters in their name, you cannot use a single-byte session character set to create a new UDF, UDT, method, or Java stored procedure object even if the new object name contains only single-byte characters. Otherwise, the system returns an error to the requestor. Instead, use a multibyte session character set.
lower_bound
Signed INTEGER number that defines the lower bound for a multidimensional VARRAY type dimension. The lower boundary can be a negative number and must be less than or equal to upper_bound.
upper_bound
Signed INTEGER number that defines the upper bound for a multidimensional VARRAY type dimension. The upper boundary can be a negative number and must be greater than or equal to lower_bound.
maximum_size
Maximum size of a type created as a multidimensional VARRAY. The current dimension of the multidimensional VARRAY can have a maximum size 64,256 bytes.
When you specify this option, the lower bound for the current dimension is implicitly defined to be 1.
This must be an unsigned INTEGER value.
data_type
The data type on which the multidimensional ARRAY type is based.
The element types of an array must be chosen from an existing Teradata data type including Distinct UDTs, Structured UDTs, and Period data types.
You can specify any predefined Teradata data types, except for:
  • BLOB
  • CLOB
  • Distinct and structured LOB-based UDT
  • Geospatial
  • One-dimensional ARRAY types
  • Multidimensional ARRAY types
  • JSON
  • XML and XMLTYPE
  • DATASET
You cannot specify a character server data set of KANJI1. Otherwise, the system returns an error to the requestor.
See Data Types and Literals, B035-1143 for documentation of the predefined data types supported by Teradata Cloud.
DEFAULT NULL
Initialize all of the elements of array_type_name to null when the type is created.