Ispirer Website Ispirer Capabilities - Informix Migration Free Trial

Informix Dynamic Server (IDS) Data Types - SERIAL

Versions: Informix Dynamic Server 11.x, 10.x, 9.x and 7.x

Informix - SERIAL
Syntax SERIAL[(n)]
Data 32-bit auto-increment integer data, UNIQUE and PRIMARY KEY constraints are not automatically assigned

UPDATE statement cannot be used to change an existing serial value
To insert an explicit value, specify any integer greater than zero in INSERT statement.
If you specify 0 then the next serial value will be assigned
Parameters n is the starting number
Default n is 1
Range 1 to 231-1, negative values are not allowed
Storage Size 4 bytes
Internals Implemented as INT
Standards Informix SQL Extension

Example:

CREATE TABLE t_serial (c1 SERIAL);

Informix SERIAL - Equivalents in Other Databases

Database Data Type and Conversion
Oracle NUMBER(10,0) with SEQUENCE object
SQL Server INT with IDENTITY property
MySQL INT with AUTO_INCREMENT property
PostgreSQL SERIAL
Sybase ASE NUMERIC(10,0) with IDENTITY property

Related Data Types in Informix

Data Types
Integers BIGINT INT SMALLINT
Auto-increment integers BIGSERIAL

All Data Types


© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.