TRY:
create trigger T_Name on a
for update
asif update(issub)
update a set col=b*C ,col2=b*c
from inserted
create trigger T_Name on a
for update
asif update(issub)
update a set col=b*C ,col2=b*c
from inserted
FOR UPDATE
AS
update 表名 set 列名=b+c
where 列名='a'
insert op select 'a',2,3,4 union select 'b',3,4,4 union select 'c',4,3,4a 2 3 4
b 3 4 4
c 4 3 4create trigger t_name on op
for update
asdeclare @issub int,@issub1 intselect @issub=issub from inserted
select @issub1=issub from op where id='a'if ( @issub=@issub1 )
update op
set op.col1=b.col1+c.col1
from ( select * from op where id='b' ) b ,
(select * from op where id='c')c
where op.id='a'
update op
set issub=5
where issub=2a 5 7 4
b 3 4 4
c 4 3 4