Numeric data types

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

BIGINT

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))

BOOLEAN/BOOL

Either 1 or 0

INTEGER/INT

Integer numbers from -2,147,483,647 to 2,147,483,647

SMALLINT

Integer numbers from -32,767 to 32,767

TINYINT

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

NUMERIC / DEC / DECIMAL(p)

Floating-point numbers of precision p

FLOAT / DOUBLE PRECISION

Floating-point numbers with double-precision

SMALLFLOAT / REAL

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

BIGINT

SERIAL

Stores large sequential integers in same range as INT

INT/INTEGER

SERIAL8

Stores large sequential integers in same range as INT8

BIGINT

 

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.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.