Previous Topic: SQLDA (DESCRIBE or PREPARE INTO Statements)Next Topic: Data Type of the Column


Data Type of the Column and Null Value

The following applies when the value expected or returned has a code showing the data type of the column, whether it can contain null values, and whether it is signed, as shown below.

Field

Field

Value

Data Type

Nulls

Signed

SQLVAR

SQLTYPE

384/385

date

N/Y

N/A

SQLVAR

SQLTYPE

388/389

time

N/Y

N/A

SQLVAR

SQLTYPE

392/393

timestamp

N/Y

N/A

SQLVAR

SQLTYPE

436/437/438/439

numeric (zoned decimal)

N/Y/N/Y

Y/Y/N/N

SQLVAR

SQLTYPE

448/449

varying-length character string

N/Y

N/A

SQLVAR

SQLTYPE

452/453

fixed-length character string

N/Y

N/A

SQLVAR

SQLTYPE

456/457

long, varying-length character string

N/Y

N/A

SQLVAR

SQLTYPE

464/465

varying-length graphic string

N/Y

N/A

SQLVAR

SQLTYPE

468/469

fixed-length graphic string

N/Y

N/A

SQLVAR

SQLTYPE

472/473

long varying-length graphic string

N/Y

N/A

SQLVAR

SQLTYPE

480/481/482/483

floating-point

N/Y/N/Y

Y/Y/N/N

SQLVAR

SQLTYPE

484/485/486/487

decimal (packed decimal)

N/Y/N/Y

Y/Y/N/N

SQLVAR

SQLTYPE

496/497/498/499

large integer

N/Y/N/Y

Y/Y/N/N

SQLVAR

SQLTYPE

500/501/502/503

small integer

N/Y/N/Y

Y/Y/N/N

Note: On DESCRIBE, the type codes 384/385, 388/389, and 392/393 denote date, time, and timestamp, respectively. However, host variables do not have date/time data types, so character string variables must be used to retrieve date/time values. Thus, when the SQLDA describes host variables, these type codes denote fixed-length character string variables.