Re: corresponding teradata query for a oracle query

The Help Table works, but provides a less-readable version one table at a time. I use the following to generate similar results for several tables at once (or a whole database) in more readable format. It pulls from the same DBC.Columns like Help Table does:

Select DatabaseName, TableName, ColumnName, (case when columntype='CV' then 'VARCHAR' when columntype='DA' then 'DATE' when columntype='I' then 'INTEGER' when columntype='CF' then 'CHAR' when columntype='F' then 'FLOAT' when columntype='I2' then 'SMALLINT' when columntype='BO' then 'BLOB' when columntype='CO' then 'CLOB' when columntype='TS' then 'TIMESTAMP' when columntype='BF' then 'BYTE' when columntype='I1' then 'BYTEINT' when columntype='SZ' then 'TIMESTAMP W/ZONE' when columntype='BV' then 'VARBYTE' when columntype='DM' then 'INVERVAL DAY TO MINUTE' when columntype='D' then 'DECIMAL' else columntype end) as Datatype, (case when DecimalTotalDigits is null then ColumnLength else DecimalTotalDigits||','||DecimalFractionaldigits end) as col_length, (case when Nullable='N' then 'NOT NULL' else null end) as Nullable, (case when ColumnType in ('CO','BO','CV','CF','I','I1','I2') then null else ColumnFormat end) as ColumnFormat, DefaultValue, ColumnIdFrom DBC.Columnswhere databasename = '_yourdbname_' and tablename like '%_yourtablecriteria_%'order by databasename, tablename, columnid