INFORMIX
Informix-ESQL/C Programmer's Manual
Chapter 5: Working with Numeric Data Types
Home Contents Index Master Index New Book

The Integer Data Types

The database server supports the following data types for integer values.

SQL Integer Data Type Number of Bytes Range of Values

SMALLINT

2

-32767 to 32767

INTEGER, INT,
SERIAL

4

-2,147,483,647 to 2,147,483,647

INT8, SERIAL8

8

-9,223,372,036,854,775,807 to 9,223,372,036,854,775,807

The C language supports the short int and long int data types for integers. The size of these C integer data types depends on the hardware and operating system of the computer you use. A 32-bit platform could implement a long int with a different size than a 64-bit platform.

Therefore, when you declare an integer host variable, you must ensure that this host variable is large enough for all possible values of the SQL integer data type with which the variable is associated. For more information about how to implement integer data types on your system, check with your system administrator or your C documentation.

For more information on the INT8 or SERIAL8 data type, see page 5-7.




Informix-ESQL/C Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.