Ispirer Ispirer
 


Ispirer Home Page Ispirer SQLWays Product Page - Informix Migration Request SQLWays

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


Ispirer Home Page Ispirer SQLWays Product Page - Informix Migration Request SQLWays

sqlways/informix/data-types/serial.txt · Last modified: May 07, 2018, 03:15:26 PM (external edit)
 
© 1999-2021, Ispirer Systems Ltd.
All Rights Reserved.  Privacy Statement