demo04.sql

来自「Expert Oracle Database Architecture 9i a」· SQL 代码 · 共 23 行

SQL
23
字号
create table t ( x int, y int );
insert into t values ( 1, 1 );
commit;
create or replace trigger t_bufer
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;
/
set serveroutput on
update t set x = x+1;
prompt in another session:
prompt set serveroutput on
prompt update t set x = x+1 where x > 0;;
prompt and then come back and hit enter
pause
commit;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?