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

Monday, May 06, 2013

TeraData HELP command




HELP Command in Teradata plays a important role, This is something like “DESCRIBE” command in Oracle and DB2. This will display the object details.

The HELP Command is used to display information about database objects such as
     Databases and Users
     Tables
     Views
     Macros

HELP retrieves information about these objects from the Data Dictionary. Below are the syntactical options for various forms of the HELP command:

HELP SESSION;   
Use the HELP SESSION; command to see specific information about your SQL session.


HELP DATABASE <database-name> ;   
This command is used to display the names of all the tables (T), views (V), macros (M), and triggers (G), Join Index(J) and Stored Procedure(P)  stored in a database and table comments

HELP TABLE <table-name> ;   
This command is used to display the column names, type identifier, and any user written comments on the columns within a table.
Type      Description                                             Type      Description
CF           CHARACTER FIXED                           F              FLOAT
CV          CHARACTER VARIABLE                   BF           BYTE
D             DECIMAL                                             BV          VARBYTE
DA          DATE                                                     AT           TIME
I               INTEGER                                              TS           TIMESTAMP
I1            BYTEINT                                                              
I2            SMALLINT          

HELP USER <user-name> ;   
This command is used to display the names of all the tables (T), views (V), macros (M), and triggers (G) stored in a user area and table comments

HELP VOLATILE TABLE ;   
This command is used to display the names of all Volatile temporary tables active for the current  user session.

HELP VIEW <view-name> ;   
This command is used to display the column names, type identifier, and comments on the columns within a view.

HELP MACRO <macro-name> ;   
This command is used to display the characteristics of parameters passed to it at execution time.

HELP TRIGGER <trigger-name> ;   
This command is used to display details created for a trigger, like action time and sequence.

HELP PROCEDURE <procedure-name> ;   
This command is used to display the characteristics of parameters passed to it at execution time.

HELP COLUMN <table-name>.*  OR  HELP COLUMN <view-name>.*  OR HELP COLUMN <table-name>.<column-name>, .…;   
This command is used to display detail data describing the column level characteristics.

HELP INDEX <table-name> ;   
This command is used to display the indexes and their characteristics like unique or non-unique and the column or columns involved in the index. This information  is used by the Optimizer to create a plan for SQL.

HELP STATISTICS <table-name> ;   
This command is used to display values associated with the data demographics collected on the table. This information is used by the Optimizer to create a plan for SQL.

HELP CONSTRAINT <table-name>.<constraint-name> ;   
This command is used to display the checks to be made on the data when it is inserted or updated and the columns are involved.

HELP 'SQL';   
This command is used to display a list of all  available SQL commands and functions.

HELP 'SQL  <command>';   
This command is used to display the basic syntax and options for the SQL command used in place of the <command>.

HELP 'SPL';   
This command is used to display a list of available SPL commands.

HELP 'SPL <command>';   
This command is used to display the basic syntax and options for the SPL command used in place of the <command>