Skip to main content
The System supports transactions. A transaction groups one or more SQL statements into a single unit of work that the database either commits as a whole or discards as a whole. Transactions let you apply a set of related changes together and roll them back if any statement fails. The following SQL statements are supported in transactions. If you execute a SQL statement that a transaction does not support, the database throws an error.

Transaction Support in Ocient SQL

By default, a connection uses autocommit mode, in which the database commits each SQL statement immediately. To group several statements into a single transaction, disable autocommit with the SET AUTOCOMMIT statement. After you disable autocommit, the database adds each subsequent statement to the current transaction until you end it. To end a transaction, execute the COMMIT statement to permanently save all changes made since the transaction started. To discard those changes instead, execute the ROLLBACK statement. For the syntax and examples of these statements, see the Transactional Control Language (TCL) Statement Reference.

Transaction Support in the Drivers

The Ocient JDBC driver supports transactions. You can disable autocommit and execute the COMMIT and ROLLBACK commands from the Ocient JDBC CLI program. For details, see Commands Supported by the Ocient JDBC CLI Program. The pyocient module also supports transactions. You can set the autocommit attribute and call the commit and rollback methods on a connection object. For details, see Ocient Python Module (pyocient). Data Definition Language (DDL) Statement Reference Data Manipulation Language (DML) Statement Reference Data Query Language (DQL) Statement Reference Transactional Control Language (TCL) Statement Reference
Last modified on June 24, 2026