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

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 upon restore. Unlike CURRENT_CONNECTION, it is incremented with every new transaction, whether the client reads the value or not.

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