Firebird 2.0
PSQL Reference
Manual

INTEGER DATATYPES

Purpose

Use integer datatypes to represent values consisting of whole numbers.

Syntax

<int_type> ::=
     SMALLINT
   | INTEGER
   | BIGINT


Semantics

Integers are whole numbers. Firebird supports three integer datatypes, which differ in their size, i.e. In the range of numbers they can hold:

  • SMALLINT is a signed 16-bit integer (range –/+ 32,768)

  • INTEGER is a signed 32-bit integer (range –/+ 2,147,483,648)

  • BIGINT is a signed 64-bit integer (range -/+ 9,223,372,036,854,775,807)

Attempting to store a value in an integer variable that is too small to hold the value results in a “value overflow” exception.

Examples

The below example declares a variable of type INTEGER:

DECLARE a INTEGER;


See also

SCALED DATATYPE, FLOAT DATATYPE


previous page goto index next page

Legal information