create trigger test on CustomUser_LTDXBY_200308
for update
as
if update(customflag)
update customUser set chargedatetim=getdate(),customflag=2
from inserted a
where customUser.phone=a.phone,custom.Userservice_code=a.Userservice_code
and customflag=3
调试欢乐多
create trigger test on CustomUser_LTDXBY_200308
for update
as
if update(customflag)
update customUser set chargedatetim=getdate(),customflag=2
from inserted a
where customUser.phone=a.phone,custom.Userservice_code=a.Userservice_code
and a.customflag=3
create trigger test on CustomUser_LTDXBY_200308
for update
as
if update(customflag)
update customUser set chargedatetim=getdate(),customflag=2
where exists(select top 1 1 from inserted
where customUser.phone=phone,customUser.Userservice_code=Userservice_code
and customflag=3)
for update
as
if update(customflag)
update customUser set chargedatetim=getdate() from inserted where customUser.phone=inserted.phone and customUser.service_code=inseted.service_code