9.6. CURRENT_TRANSACTION

Available in

DSQL, PSQL

Syntax

  1. CURRENT_TRANSACTION

Type

INTEGER

Description

CURRENT_TRANSACTION contains the unique identifier of the current transaction.

Examples

  1. select current_transaction from rdb$database
  2. 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.