Sunday, June 5, 2011

How do you see a DDL for an existing table in Teradata?


By using show table command  as follows
show table tablename ;

This will display DDL structure of table along with following details
Fallback
Before/after journal
set/multiset table type
Index(PI,SI,PPI)
details about column - datatype ,default,identity/primary -foreign key .



2 comments:

  1. One more way is there to see th Schema for a particular table.

    i.e. SHOW SEL * FROM EMP;

    Where EMP is Table Name.

    ReplyDelete
  2. You can also view the table structure through teradata administrator.

    From teradata 13 onwards , it is suggested to use teradata.net instead of odbc to connect to database as larger table defination gets truncated when odbc connection is used

    ReplyDelete