create table tt
( x int,
constraint t_pk primary key(x)
)
/
create or replace trigger t_trigger
AFTER update on TT for each row
begin
dbms_output.put_line( 'Updated x=' || :old.x || ' to x=' || :new.x );
end;
/
insert into tt values ( 1 );
insert into tt values ( 2 );
/
set serveroutput on
begin
update tt set x = 2;
end;
/
begin
update tt set x = x+1;
end;
/
commit;
drop table tt;
|