比如update ... where exists(select 1 from xxx where aaa=bbb)

解决方案 »

  1.   

    标准错误
    update yyy where exists(select 1 from xxx where xxx.aaa=yyy.bbb)
      

  2.   

    update t_guaranteeproject a 
    set (workuserid,workdate)=(select b.startuserid,b.startdate 
               from t_taskinfo b 
       where a.projectid=b.projectno)
    where exists(select 1 from t_taskinfo b where a.projectid=b.projectno)
    我的语句是这样的,但是中间的select会返回多个结果,怎么才能让只返回一个结果?
      

  3.   


    如果中间的select 返回多个值,那这样子写就会更新语句会问题