SQL programming / SQL portability |
Using transaction savepoints with different database engines.
IBM® Informix® IDS 11.50 introduced transaction savepoints, following the ANSI SQL standards. While most recent database severs support savepoints, you must pay attention and avoid Informix specific features. For example, Oracle (11), SQL Server (2008 R2), Sybase ASE (15.5) do not support the RELEASE SAVEPOINT instruction. The UNIQUE clause of SAVEPOINT is only supported by IBM Informix and IBM DB2® UDB.
Database Server Type | SAVEPOINT & ROLLBACK WORK TO SAVEPOINT | RELEASE SAVEPOINT | SAVEPOINT UNIQUE |
---|---|---|---|
IBM DB2 UDB | Yes | Yes | Yes |
IBM Informix | Yes | Yes | Yes |
Microsoft™ SQL Server (Only 2005+ with SNC driver) | Yes | No | No |
MySQL | Yes | Yes | No |
Oracle Database Server | Yes | No | No |
PostgreSQL | Yes | Yes | No |
Sybase ASE | Yes | No | No |
SQLite | Yes | Yes | No |