CREATE or replace TRIGGER T_userupdateT BEFORE update ON T_user REFERENCING OLD AS old NEW AS N_ROW FOR EACH ROW
DECLARE U_xtfidemp1 varchar(36);
u_xtempcode1 varchar(20);
u_xtempcodeCount int:=0;
U_xtfidempCount int:=0;
u_id1 int:=0;
BEGIN
U_xtfidemp1:=:N_ROW.U_xtfidemp;
u_xtempcode1:=:N_ROW.u_xtempcode;
u_id1:=:N_ROW.u_id;
select count(u_xtempcode) into u_xtempcodeCount from eas.T_user where u_xtempcode is not null and u_xtempcode=u_xtempcode1 and u_id<>u_id1;
select count(U_xtfidemp) into U_xtfidempCount from eas.T_user where U_xtfidemp is not null and U_xtfidemp=U_xtfidemp1 and u_id<>u_id1;
IF u_xtempcodeCount>0 or U_xtfidempCount>0 THEN
RAISE_APPLICATION_ERROR(-20001, 'eas.T_user u_xtempcode,U_xtfidemp,U_GZCode更新数据时有错误,有重复');
END IF;
end;
CREATE or replace TRIGGER T_userupdateT BEFORE update ON T_user REFERENCING OLD AS old NEW AS N_ROW FOR EACH ROW
DECLARE U_xtfidemp1 varchar(36);
u_xtempcode1 varchar(20);
u_xtempcodeCount int:=0;
U_xtfidempCount int:=0;
u_id1 int:=0;
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
U_xtfidemp1:=:N_ROW.U_xtfidemp;
u_xtempcode1:=:N_ROW.u_xtempcode;
u_id1:=:N_ROW.u_id;
select count(u_xtempcode) into u_xtempcodeCount from eas.T_user where u_xtempcode is not null and u_xtempcode=u_xtempcode1 and u_id<>u_id1;
select count(U_xtfidemp) into U_xtfidempCount from eas.T_user where U_xtfidemp is not null and U_xtfidemp=U_xtfidemp1 and u_id<>u_id1;
IF u_xtempcodeCount>0 or U_xtfidempCount>0 THEN
RAISE_APPLICATION_ERROR(-20001, 'eas.T_user u_xtempcode,U_xtfidemp,U_GZCode更新数据时有错误,有重复');
END IF;
COMMIT;
end;
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有