17.20 - Column Attributes - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2022-06-21
dita:mapPath
uqj1639470627591.ditamap
dita:ditavalPath
nkw1500504256726.ditaval

In 16.10 and prior versions of the driver, for all column attribute information retrieved using SQLColAttribute, ODBC Driver for Teradata returns values that vary based on the data.

Starting with 16.20, ODBC Driver for Teradata returns the following column attributes based on another attribute or hard-coded to a specific value:
  • SQL_DESC_DATETIME_INTERVAL_PRECISION

    For all column types, SQL_DESC_DATETIME_INTERVAL_PRECISION = SQL_DESC_PRECISION.

  • SQL_DESC_PRECISION

    For all column types except for NUMERIC and DECIMAL, SQL_DESC_PRECISION = SQL_DESC_LENGTH.

The following table lists additional column attributes returned by ODBC Driver for Teradata, by column type.

Column Type Column Attributes Returned by ODBC Driver for Teradata 16.20 or Later
BIGINT Octet length is 20.
DATE Display size is returned as a number of characters.
DOUBLE, FLOAT, or REAL Display size is 24.
Interval types
  • Octet length is 34
  • Display size is SQL_DESC_LENGTH + 1
  • SQL_DESC_SCALE = SQL_DESC_PRECISION
JSON Octet length is SQL_DESC_LENGTH * character size.
TIME Display size is returned as a number of characters.
TIMESTAMP Display size is returned as a number of characters.