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

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

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];