请问一下写在查询分析器上的语句:update lzhu set zaiwang = (select zaiwang from kkkkk where kkkkk.haoma=lzhu.haoma)
出现的错误是:Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated. ——www.360xianhua.com
请问是何原因?

解决方案 »

  1.   

    (select zaiwang from kkkkk where kkkkk.haoma=lzhu.haoma)因为这个值不唯一可以采用连接的方式更新
      

  2.   

    将上面的sql语句改成update lzhu set zaiwang=A.zaiwang 
    from kkkkk as A 
    where kkkkk.haoma=lzhu.haoma
      

  3.   

    select zaiwang from kkkkk where kkkkk.haoma=lzhu.haoma
    上面的值不是唯一值。
      

  4.   

    update lzhu set zaiwang = (select top 1 zaiwang from kkkkk where kkkkk.haoma=lzhu.haoma order by zaiwang)update lzhu set zaiwang = (select top 1 zaiwang from kkkkk where kkkkk.haoma=lzhu.haoma order by zaiwang desc)
      

  5.   

    update lzhu set zaiwang in (select zaiwang from kkkkk where kkkkk.haoma=lzhu.haoma)