Chapter 11. Context Variables

11.1 CURRENT_CONNECTION

Available inDSQL, PSQL

TypeINTEGER

Syntax

  1. CURRENT_CONNECTION

CURRENT_CONNECTION contains the unique identifier of the current connection.

Its value is derived from a counter on the database header page, which is incremented for each new connection. When a database is restored, this counter is reset to zero.

Examples

  1. select current_connection from rdb$database
  2. execute procedure P_Login(current_connection)