Is it possible to execute a stored procedure inside a trigger?
Thank you
Yes, like this:
create or replace trigger trg
after insert on emp
for each row
begin
myproc(:new.empno, :new.ename);
end;
Yes you can fire a procedure from a Trigger. But, keep in mind that trigger & procedur e should not acess the same table.
Yes you can. Just keep in mind that a trigger can fire for every row affected with a DML trigger. So your stored procedure should be optimized or you could will run into performance issues. Triggers are a good thing but you just have to keep in mind the performance issues that can come up when using them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With