create or replace trigger t1
after update on emp
referencing new_table as ntable
for each row
mode db2sql
begin
declare e_name varchar(30);
declare sal integer;
declare e_comm integer;
declare cursor c1
for
select ename,salary,comm
from ntable;
open c1;
fetch c1 in e_name,sal,e_comm;
close c1;
end;
we cant create a cursor inside a trigger, so we have to create a stored procedure with cursor and call it in the trigger. pls tell me how to create a stored procedure with cursor using transition table.
i hope i am clear with the question. thanks.