Auto-incremented columns (serials)
How to implement automatic record keys.
IBM® Informix®
provides the SERIAL, BIGSERIAL or SERIAL8 data types which can be emulated with database drivers for
most non-Informix database engines by using
native sequence generators (when "ifxemul.serial
" FGLPROFILE setting is
true
).
But, this requires additional configuration and maintenance tasks. If you plan to review the programming pattern of sequences, it is recommended that you use a portable implementation instead of the serial emulation provided by the database drivers.
This section describes different solutions to implement auto-incremented fields. The preferred implementation is the solution using SEQUENCES.
Database Server Type | Serial type support |
---|---|
IBM DB2® LUW | Emulated, see details |
IBM Informix | Yes, this is a native Informix feature |
IBM Netezza | No, see details |
Microsoft™ SQL Server | Emulated, see details |
Oracle® MySQL / MariadDB | Emulated, see details |
Oracle Database Server | Emulated, see details |
PostgreSQL | Emulated, see details |
SAP HANA® | Emulated, see details |
SQLite | Emulated, see details |