Example: SHOW TYPE for ARRAY Types - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

Create the following ARRAY types.

     CREATE TYPE myarray_1 AS 
     VARRAY(5) OF CHARACTER(10);
     CREATE TYPE myarray_2 AS 
     CHARACTER(10) ARRAY[5];

A SHOW TYPE request for the ARRAY type myarray_1 returns the following information. Note that the SQL text returned for CREATE TYPE myarray_1 is reported using ARRAY format rather than the VARRAY format that was used to create the type. Because of this, the CREATE TYPE SQL text returned for myarray_1 is identical to that returned for myarray_2.

     SHOW TYPE myarray_1;
     CREATE TYPE myarray_1 AS CHARACTER(10) ARRAY[5];

A SHOW TYPE request for the ARRAY type myarray_2 returns the following information.

     SHOW TYPE myarray_2;
     CREATE TYPE myarray_2 AS CHARACTER(10) ARRAY[5];