FirebirdSQL logo

OLD

Record with the initial values of a row before update or delete

Available in

PSQL — triggers only,
DSQL — RETURNING clause of UPDATE, UPDATE OR INSERT and MERGE

Type

Record type

Syntax
OLD.column_name
Table 1. OLD Parameters
Parameter Description

column_name

Column name to access

OLD contains the existing version of a database record just before a deletion or update.The OLD record is read-only.

Note

In multi-action triggers OLD is always available.However, if the trigger is fired by an INSERT, there is obviously no pre-existing version of the record.In that situation, reading from OLD will always return NULL.

RESETTING

Indicates if the trigger fired during a session reset

Available in

PSQL — triggers only

Type

BOOLEAN

Syntax
RESETTING

Its value is TRUE if session reset is in progress and FALSE otherwise.Intended for use in ON DISCONNECT and ON CONNECT database triggers to detect an ALTER SESSION RESET.