HELP TABLE Usage Notes - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

A request to display all or most the columns of a large table may return an error message. If this occurs, you can display the table definition with the SHOW TABLE statement, and may be able to display column attributes by querying the Data Dictionary view named DBC.ColumnsV.

HELP TABLE and Column-Partitioned NoPI Tables and Join Indexes

HELP TABLE returns information about each column in the table. Its output is the same as the output for an nonpartitioned table or join index.

Table and Join Index Attributes

HELP TABLE returns a set of attributes for each column in the specified table, as shown in the following table of attributes. Columns appear in the order defined.

Attribute Data Type Nullable? Comments
Column Name VARCHAR(30) No The name of a column in the specified table.

Interpret as the equivalent of CF, or CHARACTER(n) data type.

When DATEFORM=ANSIDATE, this column must be described externally as CHARACTER(10).

Type CHARACTER(2) No The data type for Column Name.

The character data types Latin, Unicode, Graphic, KanjiSJIS, and Kanji1 are distinguished with respect to CF and CV by their respective value for the Character Type column.

Default output format for the code is X(2).

See Data Type Codes for a complete list of data types and codes.

Comment VARCHAR (255) Yes The contents of the optional comment field for the table, if a comment was created
Nullable CHARACTER Yes Whether the column accepts nulls.
  • N specifies that the column does not accept nulls.
  • Y specifies that the column accepts nulls.
Format VARCHAR(30) Yes The format for Column Name.

The CHARACTER SET attribute for FORMAT is Unicode regardless of the system language support mode and session character set.

With an explicit format, DATE.

HELP TABLE reports format attributes only in these cases:
  • The formats do not match the default format for the column.
  • The column has the DATE data type.

    The system reports the FORMAT string.

With an implicit format created in INTEGERDATE mode, 'YYYY/MM/DD'.

With an implicit format created in ANSIDATE mode, 'YYYY/MM/DD'.

Title VARCHAR(60) Yes The title for the column, if a title exists.
Max Length INTEGER Yes Maximum amount of storage in bytes.

MaxLength is the length of the external CharFix representation of the column, defined as CHARACTER(MaxLength) in USING clauses and any other place this must be specified.

MaxLength for the DATE type is 4, representing the internal storage size.

MaxLength is typically expressed as the internal size, but presentation of the external size is more appropriate for these data types.

See the external representation for each individual DateTime and Interval type in DateTime and Interval Data Types to determine the MaxLength values.

You can use the StatementInfo parcel to return the description of items within the Data Field of the corresponding indicator mode Record parcels.

For example, the FastLoad.TABLE command can be run in Indicator Mode to get the additional information of data type and length of all table attributes. That information can then be used to fetch the data correctly in any release of Vantage.

Decimal Total Digits SMALLINT

Formatted as -(5)9

Yes If type is DECIMAL.

For INTERVAL types, returns a value from 1–4 representing the number of digits in the leading field of the interval (number of non-fractional digits for INTERVAL SECOND).

This column is null for TIME and TIMESTAMP data types.

Decimal Fractional Digits SMALLINT

Formatted as -(5)9

Yes If type is DECIMAL.

For TIME and TIMESTAMP types and all INTERVAL types with a SECOND field, this column returns a value of 0–6, indicating the fractional precision of seconds.

For INTERVAL types without a SECOND field, the column returns null.

Range Low FLOAT Yes Null. BETWEEN clause is included in column constraint.
Range High FLOAT Yes Null. BETWEEN clause is included in column constraint.
Uppercase CHARACTER Yes Reported if the column data type is CHARACTER or VARCHAR.
  • B specifies that column attributes for both UPPERCASE and CASESPECIFIC are defined.
  • C specifies that the column attributes for CASESPECIFIC is defined.
  • N specifies that column attributes for neither UPPERCASE nor CASESPECIFIC are defined.
  • U specifies that the column attributes for UPPERCASE is defined.

Otherwise null.

Table/View? CHARACTER No Object type.
The value reported depends on whether the request is HELP JOIN INDEX or HELP TABLE.
  • I specifies join index.
  • O specifies NoPI table.
  • Q specifies queue table.
  • T specifies base table.
Default Value VARCHAR (255) Yes Returns the default value (as text) for the parameter.

The value is null if there is no default value.

Character Type SMALLINT Yes Returns a code for the server character set for the column.
  • 1 specifies LATIN server character data type columns.
  • 2 specifies UNICODE server character data type columns.
  • 3 specifies KANJISJIS server character data type columns.
  • 4 specifies GRAPHIC server character data type columns.
  • 5 specifies KANJI1 server character data type columns.

If the data type of the column is not character, returns null.

IDCol Type CHARACTER(2) Yes Returns a code for the type of identity column.
  • GA specifies Generated Always.
  • GD specifies Generated by Default.
Temporal Column CHARACTER(2) Yes Whether a column is temporal and part of a Temporal Relationship constraint.
  • N specifies a non-temporal column.
  • R specifies that the column is part of a temporal relationship constraint.
  • T specifies a TRANSACTIONTIME column.
  • V specifies a VALIDTIME column.
Current ValidTime Unique? CHARACTER(2) Yes Reports whether a column is a UNIQUE Current VALIDTIME column.
Sequenced ValidTime Unique? CHARACTER(2) Yes Reports whether a column is a UNIQUE Sequenced VALIDTIME column.
NonSequenced ValidTime Unique? CHARACTER(2) Yes Reports whether a column is a UNIQUE Nonsequenced VALIDTIME column.
Current TransactionTime Unique? CHARACTER(2) Yes Reports whether a column is a UNIQUE Current TRANSACTIONTIME column.
Column Dictionary Name VARCHAR(128) No The attributes shown in this section are based on and supersede the corresponding older attributes, Column Name, and Title, while providing additional functionality.

The older attributes are retained for compatibility with existing applications.

The system returns this set of attributes for each column in the HELP TABLE.

For details, see the topics beginning with Object Name and Title Data in HELP Reports.

Column SQL Name VARCHAR(644) No
Column Name UEscape VARCHAR(1) Yes
Dictionary Title VARCHAR(256) No
SQL Title VARCHAR(1284) No
Title UEscape VARCHAR(1) Yes