How to find Table name, column name, column datatype and Number of row in table

Database

How to find Table name, column name, column datatype and Number of row in table

Hi Team,

Can any one please help me with the query to pull all Table name, column name, column datatype and Number of row in table in teradata.

Please respond. Thanks in advance

Regards,

2 REPLIES
Senior Apprentice

Re: How to find Table name, column name, column datatype and Number of row in table

dbc.TablesV -> table metadata

dbc.columnsV -> column metadata

If an approximate count is ok you might simply query dbc.StatsV, otherwise you need Dynamic SQL in a Stored Procedure to do the counts.

Re: How to find Table name, column name, column datatype and Number of row in table

Thank you very much Dnoeth :)