TRY:
create trigger T_Name on a
for update
asif update(issub) 
  update a set col=b*C ,col2=b*c
  from inserted

解决方案 »

  1.   

    CREATE TRIGGER [触发器名] ON [dbo].[表名] 
    FOR  UPDATE
    AS
    update 表名 set 列名=b+c 
        where 列名='a'
      

  2.   

    这样的意思么create table op( id char(20), issub int , col1 int ,col2 int)
    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