请问用什么语句能只更新符合条件的首条语句?如同select top 1 percent 的效果~

解决方案 »

  1.   

    UPDATE TOP(1) tb SET
       xx=xx
    WHERE xx=xxx
      

  2.   


    update top (1) TB set col1=value1 where col2=value2 order by date desc 
      

  3.   


     set   rowcount   1   
      update   [t1]   set   [b]='2'  
      

  4.   


    1:set   rowcount   1   
      update   [t1]   set   [b]='2' where [columname]=条件
    2:update top (1) [t1] set [col1]=[value1] where [columname]=条件
     
      

  5.   

     udpate [t1]   set   [b]='2' where  [b] in(  select top 1 b from t1)