On Apr 21, 10:59 am, student4life <student4li...@gmail.com> wrote:
> could someone inform me how one can tell/differentiate whether a
> completed transaction was update or delete ? (for example, SQL
> %ROWCOUNT does NOT differentiate the two). TIA
Why would it? It's an accounting of the rows PROCESSED by the
transaction, not a diary OF that transaction. I don't understand why
you think this differentiation is necessary so please enlighten us.
In triggers you can differentiate between the acts:
create or replace trigger my_neat_trigger
before insert or update or delete on yak_master
for each row
declare
ying exception;
mutz exception;
arlewon exception;
pragma exception_init(ying, -20097);
pragma exception_init(mutz, -20875);
pragma exception_init(arlewon, -20993);
zarq number:=0;
begin
if inserting then
<glorious and complicated code here>
if zarq < 0 and zarq > -6 then
raise zing;
end if;
elsif updating then
<even more spectacular code here>
if zarq <-6 and zarq > -11 then
raise mutz;
end if;
else
-- well, we must be deleting ...
<exceptionally enlightening code here>
if zarq <= -11 then
raise arlewon;
end if;
end if;
exception
when zing then
<magical code here>
when mutz then
<mystical code here>
when arlewon then
<ethereal code here>
when others then
<pedestrian code here>
end;
/
I can't understand a reason to need that ability outside of a
trigger. Maybe I'm missing something ...
David Fitzjarrell
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---