A reader, July 04, 2016 - 7:14 am UTC
Thanks Connor McDonald,
for use full response for my question,
right now i am using this but just thinking about that, is any way to recognize this cascade delete or delete query inside trigger or not.
so can avoid extra trigger and global variable or it's not possible to differentiate this.
July 04, 2016 - 12:21 pm UTC
I would imagine with some queries to the v$ views you could make some inferences, eg (the below not tested btw):
use v$session to examine sql_id and prev_sql_id to see if either contains a delete to the parent.
But that seems a overly convoluted means of doing so. Before heading down that path, I'd be asking why you need to distinguish between them ?