日期:2014-05-17 浏览次数:20460 次
ALTER trigger [dbo].[trd_hwxxupdate]
On [dbo].[Hwxx]
for Update
As
if update(hwzt)
begin
update jydxx
set jydzt='03'
from jydxx br,Deleted d,Inserted i
where br.jydbh = d.jydbh
end
ALTER trigger [dbo].[trd_hwxxupdate]
On [dbo].[Hwxx]
for Update
As
if update(hwzt)
begin
update jydxx
set jydzt= case when i.hwzt = '01' then '01'
when i.hwzt = '02' then '02'
when i.hwzt = '03' then '03'
end
from jydxx br,Inserted i
where br.jydbh = i.jydbh
end