How to see tables in view in sql Teradata

You can build Views over Table or Tables or some other views. To see the view definition just use the SHOW command.
Syntax:

SHOW VIEW VIEW_NAME;

Now if the view is built on several views and it is taking multiple SHOW commands to identify and reach to base tables then use below query to see all the underlying VIEW definitions.
Syntax

SHOW SELECT * FROM VIEW_NAME;

This will list down all the intermediate view definitions till the base tables provided you have proper access privileges.

Leave a Reply

Your email address will not be published. Required fields are marked *