create trigger on yourTable
For Delete
As
   update yourTable set col2 = col2-1
        where col1 > (select col1 from deleted)or:
create trigger on yourTable
For Delete
As
   declare @a varchar
   select @a = col1 from deleted 
   update yourTable set col2 = col2-1
        where col1 > @a

解决方案 »

  1.   

    create trigger t on table for delete
    as
    update test set col2=col2-1 where col2>(select col2 from deleted)
      

  2.   

    和ID标识的跳号是一样的TRY:
    表的删除触发器中加:update 表 set col2=(select count(*) from 表 bb where bb.col2<表.col2)+1
      

  3.   

    ALTER  TRIGGER [t_delete] ON [dbo].[yourtable] 
    FOR delete 
    AS
    begin transaction
    declare @pos int
    select @pos=col2 from deleted
    update yourtable set col2=col2-1 where col2>@pos
    commit transaction
    -------------------------接分
      

  4.   

    create trigger on yourTable
    For Delete
    As
       update yourTable set col2 = col2-1
            where col1 > (select col1 from deleted)
      

  5.   

    create trigger t_delete on 你的表
    For Delete
    As
       update 你的表 set col2 = col2-1
            where col1 > (select min(col1) from deleted)