Capture Teradata Datatypes

BryceMT
BryceMT used Ask the Experts™
on
Dear Experts -

I am trying to capture the datatypes of each column in a list of tables in Teradata.  What is the best way to do this - is there some SQL command I can issue from QueryMan?  

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
So far I have code that lists all the tables in a given Database:

Select tablename from
dbc.tables
where databasename = 'DatabaseName'
Commented:
select c.databasename
      ,c.tablename
      ,c.columnname
      ,c.columntype
      ,TYPE(c.columnname) as DataType
from sys_user_v.columns  c
where c.databasename = 'DatabaseName'
and   c.tablename    = 'MyTableName'          
order  by 1,2,3

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial