Example: Using ColumnsV - Advanced SQL Engine - Teradata Database

Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
prb1610499325399.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1092
lifecycle
previous
Product Category
Teradata Vantage™

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