Compound Trigger Variables Being Reset To NULL During DELETE CASCADE
(Doc ID 1638849.1)
Last updated on FEBRUARY 20, 2019
Applies to:Oracle Database - Enterprise Edition - Version 18.104.22.168 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
There is a compound trigger that fires on INSERT, UPDATE, DELETE on a table.
In the BEFORE STATEMENT section, the code sets a 'global' variable defined
within trigger scope.
That variable is referenced in the BEFORE EACH ROW section.
If the trigger fires as the result of a 'direct' operation, all is fine. If
the trigger fires as the result of a ON DELETE SET NULL foreign key
constraint, again, all is fine.
If the trigger fires as the result of an ON DELETE CASCADE foreign key
constraint, the variable is correctly set in the BEFORE STATEMENT code but is
NULL in the BEFORE EACH ROW code.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document