Previous Topic: SQLLENNext Topic: SQLSCALE


SQLTYPE

A code indicating the data type of the host variable. The codes from 1 through 127 are the same as those defined in the SQL standard. Codes greater than 127 were assigned before SQL standards existed for these datatypes.

Current SQL standard codes are:

Code

Meaning

1

CHARACTER

2

NUMERIC

3

DECIMAL

4

INTEGER (four bytes)

5

SMALLINT (two bytes)

6

FLOAT

7

REAL

8

DOUBLE PRECISION

9

Datetime (DATE, TIME, or TIMESTAMP)

10

Reserved

11

Reserved

12

VARCHAR

Current CA IDMS extensions are:

Code

Meaning

128

NUMERIC (UNSIGNED)

129

DECIMAL (UNSIGNED)

130

BIGINT or LONGINT (eight bytes)*

131

Reserved

132

GRAPHIC

133

VARGRAPHIC

134

Reserved for precompiler use (GROUP)

135

BINARY/SQLBIN*

136

TID or Tuple ID (eight bytes, used for ROWID)

140

Reserved

141

Filler field (entry is used to adjust subsequent alignments but is otherwise ignored)

142

Reserved for precompiler use (SQLIND)

* SQL standard datatype but datatype code in CA IDMS differs from the SQL standard.