Obtaining Information about View Columns - Advanced SQL Engine - Teradata Database

Database Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
rgu1556127906220.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1093
lifecycle
previous
Product Category
Teradata Vantageâ„¢

The DBC.ColumnsV[X] views provide complete information for table columns but provide only limited information for view columns. For view columns, DBC.ColumnsV[X] provides a NULL value for ColumnType, DecimalTotalDigits, DecimalFractionalDigits, CharType, ColumnLength, and other attributes related to data type.

To obtain complete information about view columns, issue a SELECT request on either DBC.ColumnsQV[X] or DBC.ColumnJQV[X]. A SELECT request on DBC.ColumnsQV[X] or DBC.ColumnsJQV[X] can also be joined with other views and tables.

  • DBC.ColumnsQV[X] provides the same information as DBC.ColumnsV[X] for all database objects. DBC.ColumnsQV[X] additionally provides complete information for view columns.
  • DBC.ColumnsJQV[X] provides the same information as DBC.ColumnsV[X] for tables, NoPI tables, and views, and DBC.ColumnsJQV[X] additionally provides complete information for view columns. DBC.ColumnsJQV[X] does not provide information for database objects other than tables, NoPI tables, and views. The filter improves performance for requests that return information about tables and views only.
The following request lists all the VARCHAR columns of the view 'Views_Database.Dept300':
SELECT * FROM DBC.ColumnsQV WHERE DatabaseName='Views_Database' AND TableName='Dept300' AND ColumnType = 'CV';