如题:
在PL/SQL中,输入如下语句:
->SQL:Set Serveroutput On
->SQL:create or replace trigger Temp_bur
before insert on temp
for each row
begin
dbms_output.put_line('bur old N:'||:old.n||' M:'||:old.M);
dbms_output.put_line('BUR new N:'||:new.n||' M:'||:new.M);
end Temp_bur;->SQL:/执行第1行就出错了,报错如下:
ORA-00922:选项缺失或无效请教高手过来解答下。我想在PL/SQL里面把我想要的输出来:bur old N: 等等,另外问个菜鸟问题,如果能成功输出,会在哪里输出呢?
在PL/SQL中,输入如下语句:
->SQL:Set Serveroutput On
->SQL:create or replace trigger Temp_bur
before insert on temp
for each row
begin
dbms_output.put_line('bur old N:'||:old.n||' M:'||:old.M);
dbms_output.put_line('BUR new N:'||:new.n||' M:'||:new.M);
end Temp_bur;->SQL:/执行第1行就出错了,报错如下:
ORA-00922:选项缺失或无效请教高手过来解答下。我想在PL/SQL里面把我想要的输出来:bur old N: 等等,另外问个菜鸟问题,如果能成功输出,会在哪里输出呢?
SQL> create table temp(n int,m int);表已创建。SQL> create or replace trigger Temp_bur
2 before insert on temp
3 for each row
4 begin
5 dbms_output.put_line( 'bur old N: '||:old.n|| ' M: '||:old.M);
6 dbms_output.put_line( 'BUR new N: '||:new.n|| ' M: '||:new.M);
7 end Temp_bur;
8 /触发器已创建SQL> insert into temp select 1,2 from dual;
bur old N: M:
BUR new N: 1 M: 2已创建 1 行。SQL>
autotrace,refcursor变量定义啥的只能用在sqlplus里.
非常感谢大家这么热心的帮助,我改用在commond window 执行就可以了。