You need to spend some time familiarizing yourself with the dbc views. In particular, dbc.columns, which should answer your question. The Teradata User Documentation will assist in your quest as well.
The following code snippet will create a small table with an identity column and interrogate said view to show you how dbc.columns keeps track of the columns in the database.
This should be a great learning experience!
CREATE TABLE <INSERT db name here>.ColumnTest
, NO FALLBACK
, NO BEFORE JOURNAL
, NO AFTER JOURNAL
, CHECKSUM = DEFAULT
(IDColumn BIGINT GENERATED always AS IDENTITY
,Column2 INTEGER
,Column3 INTEGER)
PRIMARY INDEX (IDcolumn);
SELECT * FROM dbc.COLUMNS WHERE columnname = 'idcolumn';
You'll see the datatypes, column order and some additional flags, one of which is IDColType...
You need to spend some time familiarizing yourself with the dbc views. In particular, dbc.columns, which should answer your question. The Teradata User Documentation will assist in your quest as well.
The following code snippet will create a small table with an identity column and interrogate said view to show you how dbc.columns keeps track of the columns in the database.
This should be a great learning experience!
You'll see the datatypes, column order and some additional flags, one of which is IDColType...