Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateContext variables → CURRENT_TRANSACTION
Firebird Home Firebird Home Prev: CURRENT_TIMESTAMPFirebird Documentation IndexUp: Context variablesNext: CURRENT_USER

CURRENT_TRANSACTION

Tip

Find a more recent version at Firebird 5.0 Language Reference: CURRENT_TRANSACTION

Available in: DSQL, PSQL

Added in: 1.5

Description: CURRENT_TRANSACTION contains the unique identifier of the current transaction.

Type: INTEGER

Examples: 

select current_transaction from rdb$database
New.Txn_ID = current_transaction;

The value of CURRENT_TRANSACTION is stored on the database header page and reset to 0 upon restore. It is incremented with every new transaction.

Prev: CURRENT_TIMESTAMPFirebird Documentation IndexUp: Context variablesNext: CURRENT_USER
Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateContext variables → CURRENT_TRANSACTION