Example: Using ColumnsV - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example shows a statement that selects from DBC.ColumnsV the name, format, null status, and data type of all columns in the Personnel.Employee table:

SELECT ColumnName, ColumnFormat, Nullable, ColumnType
       FROM DBC.ColumnsV WHERE DatabaseName='Personnel'
       AND TableName = 'Employee';

Partial Results:

ColumnName     ColumnFormat    Nullable   ColumnType
----------     ------------    --------   -------------
EmpNo          9(5)            N          I
Name           X(12)           N          CV
DeptNo         999             Y          I
JobTitle       X(12)           Y          CV
Salary         zzz,zz9.99      Y          D
YrsExp         z9              Y          I