编写一个触发器,员工增加提成时,他的上司的提成自己增加此员工这次提成数的30%,这个触发器可以执行成功么?(表是ORACLE SCOTT.EMP)按照我的逻辑
create or replace trigger tri_inprode_sal
before update on emp1
for each row
declare
money number(5,2);
begin
money := :new.sal - :old.sal;
update emp1 set sal = sal + money * 0.3 where empno = :old.mgr;
end;
create or replace trigger tri_inprode_sal
before update on emp1
for each row
declare
money number(5,2);
begin
money := :new.sal - :old.sal;
update emp1 set sal = sal + money * 0.3 where empno = :old.mgr;
end;
解决方案 »
- oracle..运行不出来..
- oracle时间比较问题。
- column columns format a30 word_wrapped 是啥意思
- 游标嵌套和循环嵌套的问题,快快来看:先把sql中pubs数据库的authors、titles、titleauthor三张表传到oracle中,执行下面的饿语句,总是
- 请教:不装oracle客户端,为何连不上,急!
- 帮我看看这个错误
- 在线急救,关于用ADO的STREAM对象向ORACLE存储和读取图象的问题。
- 数据导入问题
- 请问这查询的语句怎样实现?
- 数据转换问题
- 如何让oracle job定时调用一个有参的存储过程?
- plsql 死循环 ,如何停止
create or replace trigger tri_inprode_sal
before update on emp1
for each row
declare
money number(5,2);
begin
money := :new.sal - :old.sal;
:new.sal := :new.sal + money * 0.3 ;end;