FirebirdSQL logo

CURRENT_TRANSACTION

Unique identifier of the current transaction

Type

BIGINT

Syntax
CURRENT_TRANSACTION

The transaction identifier is derived from a counter on the database header page, which is incremented for each new transaction.When a database is restored, this counter is reset to zero.

Examples
select current_transaction from rdb$database

New.Txn_ID = current_transaction;

CURRENT_USER

Name of the user of the current connection

Type

VARCHAR(63)

Syntax
CURRENT_USER

CURRENT_USER is equivalent to [fblangref50-contextvars-user].

Example
create trigger bi_customers for customers before insert as
begin
    New.added_by  = CURRENT_USER;
    New.purchases = 0;
end