CREATE OR REPLACE trigger insert_info
after INSERT ON emp
FOR EACH ROW
begin
if (:new.SAL<(select sal from std where deptno = :new.sal))
then
insert into emp1 values
(:new.EMPNO,:new.ENAME,:new.JOB,:new.MGR,:new.HIREDATE,:new.SAL,:new.COMM,:new.DEPTNO);
end;
/
以上触发器编译有错,显示:
警告: 创建的触发器带有编译错误。TRIGGER INSERT_INFO 出现错误:LINE/COL ERROR
-------- -----------------------------------------------------------------
6/4 PLS-00103: 出现符号 ";"在需要下列之一时:
if
问题在哪?请网友们帮忙解惑。谢谢!触发器oracletrigger
after INSERT ON emp
FOR EACH ROW
begin
if (:new.SAL<(select sal from std where deptno = :new.sal))
then
insert into emp1 values
(:new.EMPNO,:new.ENAME,:new.JOB,:new.MGR,:new.HIREDATE,:new.SAL,:new.COMM,:new.DEPTNO);
end;
/
以上触发器编译有错,显示:
警告: 创建的触发器带有编译错误。TRIGGER INSERT_INFO 出现错误:LINE/COL ERROR
-------- -----------------------------------------------------------------
6/4 PLS-00103: 出现符号 ";"在需要下列之一时:
if
问题在哪?请网友们帮忙解惑。谢谢!触发器oracletrigger
if (:new.SAL<(select sal from std where deptno = :new.sal))
then
insert into emp1 values
(:new.EMPNO,:new.ENAME,:new.JOB,:new.MGR,:new.HIREDATE,:new.SAL,:new.COMM,:new.DEPTNO);
end if;