解决方案 »

  1.   

    用update直接更新           或者
    select ... case ... when 计算列
      

  2.   

    if exists (select top 1 1 from A where col1=1)
    begin
    update A with(rowlock) set col2=0
    end
      

  3.   

    UPDATE 表
    SET 另一列=0
    WHERE 一列='C01'
    是这个意思?
      

  4.   

    不是很清楚你的需求意思,给你两个版本
    if exists (select top 1 1 from A where col1=‘c01’)
    begin
    update A with(rowlock) set col2=0 where col1=‘c01’
    end版本二
    if exists (select top 1 1 from A where col1=‘c01’)
    begin
    update A with(rowlock) set col2=0 
    end