All Forums Database
arvind 4 posts Joined 05/09
24 Jun 2010
Show table

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

Appreciate your valuable answers!!

mjj 23 posts Joined 03/10
25 Jun 2010

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.


WAQ 158 posts Joined 02/10
28 Jun 2010

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

robpaller 159 posts Joined 05/09
29 Jun 2010

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.

You must sign in to leave a comment.