oracle是写在pl/SQL块中
下面就是一个触发器
每执行一次update操作就显示一定的信息
CREATE TRIGGER before_update_trigger
before update of price
on products
begin
if new.price
DBMS_OUTPUT.PUT_LINE('价格降低了');
else
DBMS_OUTPUT.PUT_LINE('价格升高了');
end if;
end before_update_trigger;
这个触发器会在执行update语句之间触发
表节点\触发器-右键菜单-新建触发器