16.20 - SHOW TABLE - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ Time Series Tables and Operations

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Content Type
Programming Reference
Publication ID
B035-1208-162K
Language
English (United States)
Last Update
2019-05-02

You can use SHOW TABLE to display the table definition for a PTI table. The output includes the system generated TD_TIMEBUCKET, TD_TIMECODE, and TD_SEQNO columns for PTI Tables. For complete information about SHOW TABLE syntax, see Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144.

To use the SHOW TABLE statement, you must have at least one privilege on the database containing the table.

Examples: Show a PTI Table

Below is the table definition for an example of a table that uses the timebucket option without sequencing:
CREATE TABLE ts_timebucketonly_nonseq (i INT, j INT, k INT)
    PRIMARY TIME INDEX(TIMESTAMP(6), DATE '2016-10-01', HOURS(2));
This statement lists the table definition for ts_timebucketonly_nonseq:
SHOW TABLE ts_timebucketonly_nonseq;

The SHOW TABLE output includes the two generated columns, TD_TIMEBUCKET and TD_TIMECODE, in addition to default values for the table creation options that were not specified.

CREATE SET TABLE ts_timebucketonly_nonseq, NO FALLBACK,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO,
     MAP = TD_MAP1
    (
      TD_TIMEBUCKET BIGINT NOT NULL GENERATED SYSTEM TIMECOLUMN,
      TD_TIMECODE TIMESTAMP(6) NOT NULL GENERATED TIMECOLUMN,
      i INTEGER,
      j INTEGER,
      k INTEGER)
 PRIMARY TIME INDEX (TIMESTAMP(6), DATE '2016-10-01', HOURS(2), NONSEQUENCED);