15.10 - One-Dimensional VARRAY Options - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K
array_type_name
The name of the one-dimensional 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.
SYSUDTLIB
The optional name of the containing database for array_type name.
The only valid database name is SYSUDTLIB.
VARRAY
VARYING ARRAY
The one-dimensional VARRAY type is to be created using Oracle-compatible syntax.
number_of_elements
The number of elements in the one-dimensional VARRAY type being created. This must be an unsigned INTEGER value.
The maximum size of a type created as a one-dimensional ARRAY must not exceed the maximum size of a Teradata Database row, which is 64,256 bytes.
The maximum size of the auto-generated transform string for the ARRAY must also not exceed this limitation. The size of an auto-generated transform string for an ARRAY is limited to the maximum size of a DBS VARCHAR type. Therefore, 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 the appendix topic "Transform Input/Output Strings for ARRAY/VARRAY UDTs" in SQL Data Types and Literals.
OF data type
The data type on which the one-dimensional VARRAY type is based.
The element types of an array must be chosen from an existing Teradata Database data type including distinct UDTs, structured UDTs, and Period data types. You can specify any supported Teradata Database predefined data types, except for:
  • BLOB
  • CLOB
  • Distinct and structured LOB-based UDT
  • Geospatial
  • One-dimensional ARRAY types
  • Multidimensional ARRAY types
  • JSON
  • XML and XMLTYPE
You cannot specify a character server data set of KANJI1. Otherwise, the system returns an error to the requestor.
For a description of the predefined data types, see SQL Data Types and Literals, B035-1143.
DEFAULT NULL
Initialize all of the elements of array_type_name to null when the type is created.