Example: Three-Dimensional VARRAY Type - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

These examples all create an Oracle-style 3-dimensional VARRAY type named seismic_cube based on the UDT measures_udt, which has the following SQL create text.

This example initializes all of its elements to nulls.

     CREATE TYPE seismic_cube AS
     VARRAY (1:5)(1:7)(1:20) OF measures_udt 
     DEFAULT NULL;

This example does not initialize its elements to nulls.

     CREATE TYPE seismic_cube AS
     VARRAY (1:5)(1:7)(1:20) OF measures_udt;

The next example defines an equivalent seismic_cube type, seismic_cube_2.

     CREATE TYPE seismic_cube_2 AS
     VARRAY (5)(7)(20) measures_udt;

The final example defines an equivalent seismic_cube type, seismic_cube_3.

     CREATE TYPE seismic_cube_3 AS
     VARRAY (1:5)(7)(1:20) measures_udt;