Numeric data types in their turn are subdivided into whole numbers (INTEGER, SMALLINT, BIGINT, TINYINT, BOOLEAN), floating-point numbers (DECIMAL(p), FLOAT, SMALLFLOAT) and fixed-point numbers (DECIMAL(p, s), MONEY):
|
data type |
description |
Whole Number |
Integer, ranging from -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807 (that is, −(263 −1) to (263 −1)) |
|
Either 1 or 0 |
||
Integer numbers from -2,147,483,647 to 2,147,483,647 |
||
Integer numbers from -32,767 to 32,767 |
||
Integer numbers from -128 to 127 |
||
Fixed-point |
NUMERIC / DEC / DECIMAL(p, s) |
Fixed-point numbers of scale s and precision p |
MONEY(p, s) |
Currency values, of scale s and precision p |
|
Floating-point |
Floating-point numbers of precision p |
|
Floating-point numbers with double-precision |
||
Floating-point numbers with single-precision |
In the table above p stands for precision, s stands for scale.
Querix 4GL also supports the data types of the IBM Informix Dynamic Server. These data types can be used only in SQL statements (ALTER TABLE, CREATE TABLE, etc.) embedded into 4GL source code. These data types can be used only to specify the data types of the table columns, to insert values into these columns you should use corresponding 4GL data types.
Data Type |
Description |
Corresponding 4GL Data Type |
INT8/INTEGER8 |
Stores 8-byte integer values in range −(263 −1) to 263 −1 |
|
SERIAL |
Stores large sequential integers in same range as INT |
|
SERIAL8 |
Stores large sequential integers in same range as INT8 |
Variables of DECIMAL and MONEY data type are initialized to NULL in functions, modules. and globals.
INTEGER variables are initialized to 0 (zero) in functions, modules. and globals.