6. Dynamic OpenSQL : The SQL Descriptor Area (SQLDA) : Data Type Codes
 
Share this page                  
Data Type Codes
The DESCRIBE statement returns a code indicating the data type of a field or column. This code is returned in sqltype, one of the fields in an sqlvar element.
The following table lists the data type codes. If the column, variable, or field described by the sqlvar element is nullable, the type code is returned as a negative value.
Data Type Name
Data Type Code
Nullable
integer
 30
‑30
No
Yes
float
 31
‑31
No
Yes
decimal
 10
‑10
No
Yes
character
 20
‑20
No
Yes
varchar
 21
‑21
No
Yes
date
 3
‑3
No
Yes
money
5
-5
No
Yes