Table 9-2 and Table 9-3 list the datatype code numbers and matching datatype names returned by sp_columns and sp_sproc_columnsin the “data_type” column. The source for the description is the Open Database Connectivity (ODBC) Application Programming Interface (API).
Datatype |
Code # |
---|---|
char |
1 |
decimal |
3 |
double precision |
8 |
float |
6 |
integer |
4 |
numeric |
2 |
real |
7 |
smallint |
5 |
varchar |
12 |
Datatype |
Code # |
---|---|
bigint |
-5 |
binary (bit datatype) |
-2 |
bit |
-7 |
date |
9 |
java.lang.Object |
1111 |
long varbinary |
-4 |
long varchar |
-1 |
time |
10 |
timestamp |
11 |
tinyint |
-6 |
varbinary (bit-varying datatype) |
-3 |