Show table

Database
Fan

Show table

Hi All,
Could please let me know from which DBC tables does Show table command fetches the information?

Appreciate your valuable answers!!

Tags (1)
3 REPLIES
mjj
Teradata Employee

Re: Show table

Hi,
Below is some information which would help.

If you query to DBC.Tables, it has a column "Alternate text" which gives the most recent operation which had been performed on particular object.

There is another table named "DBC.texttbl" which has entire textstring for the operation on the particular object.

Though these two tables have information of objects but I think(I am not sure) when show table command gets fired, the information about table is fetched at runtime from the defined structure of table only.

Regards,

WAQ
Enthusiast

Re: Show table

Sorry but i didn't find Alternate text in DBC.Tables.
Enthusiast

Re: Show table

In DBC.Tables look for RequestText and RequestTextOverflow. Trouble with the RequestText field is that it contains the last DDL statement that affected the table. So if you use ALTER TABLE to add a column, that is what RequestText will display.

What you can do to capture the output of SHOW TABLE is to run a BTEQ script that dynamically builds the SHOW TABLE statement and export it to a file. Then you can turn around and run the file you created within the same BTEQ to produce and export the results of the SHOW TABLE command to a single or multiple flat files.