5. Working with Embedded SQL : Dynamic Programming : 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 a type code is negative, the column, variable, or field described by the sqlvar element is nullable.
Data Type Name
Data Type Code
Nullable
byte
 23
No
 
-23
Yes
byte varying
 24
No
 
-24
Yes
C
 32
No
 
-32
Yes
char
 20
No
 
-20
Yes
date
  3
No
 
 -3
Yes
decimal
 10
No
 
-10
Yes
float
 31
No
 
-31
Yes
integer
 30
No
 
-30
Yes
long byte
 25
No
 
-25
Yes
long varchar
 22
No
 
-22
Yes
money
  5
No
 
 -5
Yes
text
 37
No
 
-37
Yes
varchar
 21
No
 
-21
Yes
Note:  Logical keys are returned as char values.
For details about dynamic programming with long varchar and long byte columns, see Using Large Objects in Dynamic SQL (see Large Objects in Dynamic SQL).