update top的使用方法

来源:互联网 发布:云计算有哪些特征 编辑:程序博客网 时间:2024/05/28 04:55

update top(10) dtms_doc_canuse   where ...后边是不能跟order by的 因此可以这么处理


update  dtms_doc_sendlinetool set issign='1' where  drilltool_id in
                      (select top 3 drilltool_id from dtms_doc_sendlinetool where send_id='S10102022014031203'
                    and sendline_id='SL101020220140312005' order by case  when  drilltool_id in('') then 1
                    when isnull(drilltool_no,'')='' then 2 else 3 end  )


0 0
原创粉丝点击