FirebirdSQL logo

Almost all operations in Firebird occur in the context of a transaction.Units of work are isolated between a start point and end point.Changes to data remain reversible until the moment the client application instructs the server to commit them.

Unless explicitly mentioned otherwise in an “Available in” section, transaction control statements are available in DSQL.Availability in ESQL is — bar some exceptions — not tracked by this Language Reference.Transaction control statements are not available in PSQL.

Transaction Statements

Firebird has a small lexicon of SQL statements to start, manage, commit and reverse (roll back) the transactions that form the boundaries of most database tasks:

SET TRANSACTION

configures and starts a transaction

COMMIT

signals the end of a unit of work and writes changes permanently to the database

ROLLBACK

undoes the changes performed in the transaction or to a savepoint

SAVEPOINT

marks a position in the log of work done, in case a partial rollback is needed

RELEASE SAVEPOINT

erases a savepoint