如何用java创建触发器

Python012

如何用java创建触发器,第1张

java是应用程序,可以通过jdbc接口调用触发器

create or replace trigger bj_customer

before update on customer

for each row

begin

update order set

cu_no=:new.cu_no,

cu_name=:new.cu_name,

cu_address=:new.cu_addess,

where cu_no=:old.cu_no;

end

调用executeUpdate方法即可

Trigger不是java特性也不是java内置的代码,而是其它程序的封装。

在Quartz中Trigger是触发器,Quartz中的触发器用来告诉调度程序作业什么时候触发

即Trigger对象是用来触发执行Job的