The following table shows how the Microsoft SQL Server, Microsoft Fabric, and Windows Azure SQL Database data types are mapped to the standard ODBC data types. "Unicode support" lists Microsoft SQL Server to Unicode data type mappings.

Table 1. Microsoft SQL Server Data Types
SQL Server ODBC
bigint SQL_BIGINT
bigint identity1 SQL_BIGINT
binary1 SQL_BINARY
bit SQL_BIT
char SQL_CHAR
date2 SQL_TYPE_DATE
datetime1 SQL_TYPE_TIMESTAMP
datetime22 SQL_TYPE_TIMESTAMP
datetimeoffset1,3, 4 SQL_VARCHAR
decimal SQL_DECIMAL
decimal() identity1 SQL_DECIMAL
float SQL_FLOAT
image1 SQL_LONGVARBINARY
int SQL_INTEGER
int identity1 SQL_INTEGER
money1 SQL_DECIMAL
numeric SQL_NUMERIC
numeric() identity1 SQL_NUMERIC
real SQL_REAL
smalldatetime SQL_TYPE_TIMESTAMP
smallint SQL_SMALLINT
smallint identity1 SQL_SMALLINT
smallmoney1 SQL_DECIMAL
text1 SQL_LONGVARCHAR
time2, 5 SQL_TYPE_TIMESTAMP
timestamp1 SQL_BINARY
tinyint1 SQL_TINYINT
tinyint identity1 SQL_TINYINT
uniqueidentifier1 SQL_GUID
varbinary SQL_VARBINARY
varbinary(max)6 SQL_LONGVARBINARY
varchar SQL_VARCHAR
varchar(max)6 SQL_LONGVARCHAR
1 Not supported for Microsoft Fabric.
2 Supported only on Microsoft SQL Server 2008 and higher.
3 Supported only for Microsoft SQL Server 2008 and higher, and Windows Azure SQL Database.
4 Datetimeoffset mapping changes based on the setting of the Fetch TSWTZ as Timestamp option.
5 Time mapping changes based on the setting of the Fetch TWFS as Time option.
6 Supported only on Microsoft SQL Server 2005 and higher.