Teradata ODBC Driver SQL Types - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-08-22
dita:mapPath
xbl1544831938754.ditamap
dita:ditavalPath
nkw1500504256726.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities

ODBC Driver for Teradata is limited to Period SQL database types as listed in the following table.

ODBC SQL Type Identifier Teradata SQL Data Type Definition in ODBC Driver for Teradata
SQL_PERIOD_DATE PERIOD(DATE) An anchored duration of dates
SQL_PERIOD_TIME PERIOD(TIME) or PERIOD(TIME(n)) An anchored duration of times. The precision n is from 0-6, default = 6.
SQL_PERIOD_TIME_WITH_TIME_ZONE PERIOD(TIME WITH TIME ZONE) or PERIOD(TIME(n) WITH TIME ZONE) An anchored duration of times, including time zone. The precision n is from 0-6, default = 6.
SQL_PERIOD_TIMESTAMP PERIOD(TIMESTAMP) or PERIOD(TIMESTAMP(n)) An anchored duration of time stamps. The precision n is from 0-6, default = 6.
SQL_PERIOD_TIMESTAMP_WITH_TIME_ZONE PERIOD(TIMESTAMP WITH TIME ZONE) or PERIOD(TIMESTAMP(n) WITH TIME ZONE) An anchored duration of time stamps, including time zone. The precision n is from 0 to 6, default = 6.
SQL_TD_FIXED_NUMBER NUMBER(p) or NUMBER(p, s) Fixed Number data types are mapped to the standard SQL_DECIMAL data type
SQL_TD_FLOATING_NUMBER NUMBER or NUMBER(*) or NUMBER(*,s) Floating Number data types are mapped to SQL_DOUBLE.
SQL_TD_XML XML XML documents, and also non-well-formed text entities such as fragments of XML documents.

The ODBC SQL type values are defined in the header file tdsql.h in <InstallDir>/include, which defines Teradata-specific attributes for ODBC connection, statement, and descriptor objects.