SQL programming / SQL portability |
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, you should 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.