We have moved to www.dataGenX.net, Keep Learning with us.

Tuesday, May 07, 2013

TeraData SHOW command

The Teradata Database offers several types of help using an interactive client.
There are times when you need to recreate a table, view, or macro that you already have, or you need to create another object of the same type that is either identical or very similar to an object that is already created. When this is the case, the SHOW command is a way to accomplish what you need. The intent of the SHOW command is to output the CREATE statement that could be used to recreate the object of the type specified.

SHOW TABLE <table-name>; 
Displays the CREATE TABLE statement needed to create this table.

SHOW VIEW <view-name>; 
Displays the CREATE VIEW statement needed to create this view.

SHOW MACRO <macro-name>; 
Displays the CREATE MACRO statement needed to create this macro.

SHOW TRIGGER <trigger-name>; 
Displays the CREATE TRIGGER statement needed to create this trigger.

SHOW PROCEDURE <procedure-name>;
Displays the CREATE PROCEDURE statement needed to create this stored procedure.

SHOW <SQL-statement>;
 Displays the CREATE TABLE statements for all tables/views referenced by the SQL  statement.