exec dbms_monitor.session_trace_enable;
-- 如果t表的表结构和下面不相符，则删除重新建表
-- drop table t;
-- create table t(x int);
select * from t;
update t t1 set x = x + 1;
update t t2 set x = x + 1;
select * from t;

-- 触发器
-- 表结构
-- create table t (x int, y int);
-- insert into t values(1,1);
create or replace trigger t_buffer
before update on t for  each row
begin
    dbms_output.put_line('old.x = ' || :old.x || ',.old.y = ' || :old.y);
    dbms_output.put_line('new.x = ' || :new.x || ',.new.y = ' || :new.y);
end;

update t set x = x + 1;

update t set x = x + 1 where x > 0;