查询出来的记录只能唯一:
update table1 set col1=(select col1 from table2 where ....)请以后发问题要清楚自已所问的意思!

解决方案 »

  1.   

    update <表名>
       set (<列名>,<列名>...)=(
                                 select <列名>,<列名>...
                                   from <表名>
                                  where <条件>
                                 )
     where <条件>正如beckhambobo(beckham) 说的,SET语句的返回值必须唯一
      

  2.   

    update 表A set A.amount=
    (select H.F from H
     where A.emp_id=H.G
    )
    where A.emp_id=H.G  //H由多个表中的字段合成的,这里报
                        // invalid column name的错误
    and A.item_id='9999'
    and A.pay_id='11'