SHOW request Examples | Teradata Vantage - 17.05 - Example: SHOW For a SELECT Request - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

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

The following example reports the DDL definitions supporting a simple SELECT request involving one view and one table. Both objects were created in database DAFDB, so qualification is unnecessary.

     SHOW
     SELECT * 
     FROM View_1, Table_2
     WHERE View1.column_1=Table2.column_3;

The report looks like this.

     *** Text of DDL statement returned.
     *** Total elapsed time was 1 second.
     -------------------------------------------------------------
     CREATE SET TABLE DAFDB.Table_2
       NO FALLBACK,
       NO BEFORE JOURNAL,
       NO AFTER JOURNAL 
        (column_1 INTEGER,
        column_2 INTEGER)
      PRIMARY INDEX(column_1);
     CREATE SET TABLE DAFDB.Table_1
       NO FALLBACK,
       NO BEFORE JOURNAL,
       NO AFTER JOURNAL
        (column_1 INTEGER)
      PRIMARY INDEX (column_1);
     CREATE VIEW View_1 AS
       SELECT column_1 FROM Table_1;