我在sql*Plus中创建表和相应的触发器,但总是有错误:创建的触发器带有编译错误。 请看下面代码: create table `Emp(old.sal number(10) not null,new.sal number(10) not null,sal_diff number(10) not null) tablespace system 创建表成功后,下面创建触发器 create or replace trigger print_salary_changes before delete or insert or update on Emp for each row declare sal_diff:=:new.sal-:old.sal; dbms_output.put('old salary:'||:old.sal); dbms_output.put('new salary:'||:new.sal); dbms_output.put_line('DIFFERENCE'||sal_diff); end; / "创建的触发器带有编译错误" 原因在哪呀?多谢!
create table `Emp(old.sal number(10) not null,new.sal number(10) not null,sal_diff number(10) not null) tablespace system
创建表成功后,下面创建触发器 create or replace trigger print_salary_changes
before delete or insert or update on Emp
for each row
declare
sal_diff:=:new.sal-:old.sal;
dbms_output.put('old salary:'||:old.sal);
dbms_output.put('new salary:'||:new.sal);
dbms_output.put_line('DIFFERENCE'||sal_diff);
end;
/
"创建的触发器带有编译错误" 原因在哪呀?多谢!