Firebird Documentation IndexFirebird 2.0 Language Ref. UpdateContext variables → INSERTING
Firebird Home Firebird Home Prev: GDSCODEFirebird Documentation IndexUp: Context variablesNext: NEW

INSERTING

Available in: PSQL

Added in: 1.5

Description: Available in triggers only, INSERTING indicates if the trigger fired because of an INSERT operation. Intended for use in multi-action triggers.

Type: boolean

Example: 

if (inserting or updating) then
begin
  if (new.serial_num is null) then
    new.serial_num = gen_id(gen_serials, 1);
end
Prev: GDSCODEFirebird Documentation IndexUp: Context variablesNext: NEW
Firebird Documentation IndexFirebird 2.0 Language Ref. UpdateContext variables → INSERTING