oracle触发器判断空值,oracle触发器加条件判断、dblink

--新增基站同步给电池组信息

create or replace trigger a_b_test

after insert or update or delete

on BJLT.BASESTATION

--REFERENCING NEW AS new_val OLD AS old_val --在这里设置名字,然后可引用新值,旧值

for each row

when(new.isnode=0)

begin

if inserting then

insert into BSMS.BS_INFO@TOBSMS_BETTERY_LOCAL.REGRESS.RDBMS.DEV.US.ORACLE.COM(INFOID, INFONAME, GROUPID, ADDRESS, BUILDDATE, MAINTENANCER,

TEL, TEMPERATURE, RECTIFIERCUR,

OUTVOL, CREATETIME, SORTID, ONEOFFVOL, TWOOFFVOL, ISNODE, NODENUM, ONOFFPOWER, ONOFFPOWERMODEL,

POWERA, POWERB, POWERC, POWEROUT, POWERACUR, POWERBCUR, POWERCCUR, POWERAVOL, POWERBVOL,

POWERCVOL, DOOROPEN, HS, YANGAN, SHUIJIN, HONGWAI, KONGTIAO, VERID)

-- values (BID,BNAME,GROUPSID,

values (:new.ID,:new.NAME,:new.GROUPSID,

'',sysdate,'',

'',0,'',

1,sysdate,1,

你可能感兴趣的:(oracle触发器判断空值)