Compound Trigger Variables Being Reset To NULL During DELETE CASCADE
(Doc ID 1638849.1)
Last updated on JANUARY 08, 2025
Applies to:
Oracle Database Cloud Service - Version N/A and laterOracle Database - Enterprise Edition - Version 11.2.0.3 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
Symptoms
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.
Cause
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
Symptoms |
Cause |
Solution |
References |