How to check the table definition or view definition of table in Teradata

SHOW Table :

Some time we want to check the table definition such as number of columns ,data type of the column,primary key ,unique constraints and so on. In that case, SHOW table helps to get the table definition in Teradata

Syntax for Show table:

Example for show table:


Output of Show table function

Show View:

Show view is used to check the view definition of the table.Basically view is created on top of the table.We can restrict the user to view only few columns from table by using view. We can create many view on the same table to restrict the different user to view different columns.

Syntax for Show view:

Example for show view:


Show Function :

Teradata allows to create the user defined function to perform the specific operation on the column values such as format the date or timestamp, modify the string and so on.Show function helps to view the implementation of those user defined functions.

Syntax for Show function:

Recommended Articles