15.10 - Example: SHOW For a SELECT Request - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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;