CREATE TYPE SQL Statement (ARRAY/VARRAY) | Teradata Vantage - CREATE TYPE (ARRAY/VARRAY Form) - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

Creates a user-defined ARRAY or VARRAY data type that is constructed from a predefined Vantage data type, a distinct UDT data type, a structured UDT data type, or an internal UDT data type.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Unlike the ANSI SQL:2011 requirement, you must create a one-dimensional ARRAY or VARRAY type before you can use it. This variance from the ANSI SQL:2011 standard is compatible with Oracle one-dimensional VARRAY types and with IBM SQL PL one-dimensional ARRAY types.

ANSI SQL:2011 does not define a standard for multidimensional ARRAY types, nor do other major relational database management system vendors support them.

One-Dimensional ARRAY - Teradata Form

One-dimensional ARRAY types only support a lower bound of 1. Every one-dimensional ARRAY type you create has a first array element indexed by the number 1.

One-Dimensional VARRAY - Oracle-Compatible Form

One-dimensional VARRAY types only support a lower bound of 1. Every one-dimensional VARRAY type you create has a first array element indexed by the number 1.

Required Privileges

You must have either the UDTTYPE or UDTMETHOD privilege on the SYSUDTLIB database to create an ARRAY or VARRAY UDT.

Privileges Granted Automatically

None.