触发器应用场景二:数据的确认

触发器应用场景二:数据的确认

create or replace tripper  checksalary

before update

on emp

for each row

begin

if:new.sal<:old.sal then

raise_application_error(-20002,'涨后的薪水不能小于之前的薪水');

end if

end

:new和:old

其代表同一条记录

:new  代表操作之后的值

:old    代表操作之前的值

相关文章:

  • 2021-11-11
  • 2021-05-08
  • 2021-04-22
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2021-04-04
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-07-20
  • 2021-10-19
相关资源
相似解决方案