HELP COLUMN Report on a Unicode View Differs From a Compatibility View - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

The result of a HELP COLUMN statement using a Unicode view differs from the results for the same column using a Compatibility view. For details, see Teradata Vantage™ - Advanced SQL Engine International Character Set Support, B035-1125.

Only the first 30 characters of object names are available from Compatibility views. Teradata strongly encourages you to use Unicode views instead. For a list of the Compatibility views that have been deprecated, see Teradata Vantage™ - Data Dictionary, B035-1092.

In this example, HELP COLUMN returns information for the tablename column from the Unicode TablesV view:

     HELP COLUMN dbc.tablesv.tablename;
      *** Help information returned. One row.
Column Name TableName
                     Type CV
                 Nullable N
                   Format X(128)
               Max Length           256
     Decimal Total Digits ?
Decimal Fractional Digits ?
                Range Low                        ?
               Range High                        ?
                UpperCase N
              Table/View? V
                 Indexed? Y
                  Unique? N
                 Primary? S
                    Title ?
        Column Constraint ?
                Char Type  2
              IdCol Type ? ?
                UDT Name ? ?

The following HELP COLUMN request uses the DBC.Tables view instead of the DBC.TablesV view:

     HELP COLUMN dbc.tables.tablename;
*** Help information returned. One row.
*************Column Name TableName
                     Type CF
                 Nullable Y
                   Format X(30)
               Max Length            30
     Decimal Total Digits ?
Decimal Fractional Digits ?
                Range Low                        ?
               Range High                        ?
                UpperCase N
              Table/View? V
                 Indexed? N
                  Unique? ?
                 Primary? ?
                    Title ?
        Column Constraint ?
                Char Type  1
              IdCol Type ? ?
                UDT Name ? ?

The differences between this result and the result using the DBC.TablesV view are highlighted in boldface. The Type, Format, Max Length, and Char Type are different because the Compatibility view casts the object name to 30 fixed characters in the Kanji1, or Latin, server character set.

Text strings work in a similar fashion. For example, the ColumnTitle column of the Columns compatibility view and the ColumnsV Unicode view returns different values for Type, Format, Max Length, and Char Type.