update c
set 出版社ID=b.id
from c 
inner join a on c.书=a.书
inner join b on a.出版社=b.出版社

解决方案 »

  1.   

    update c set 出版社ID=b.id
    from a ,b 
    where c.书=a.书 and a.书=b.书
      

  2.   

    update c set 出版社ID=b.id
    from a ,b 
    where c.书=a.书 and a.出版社=b.出版社
      

  3.   

    update c set 出版社ID = t1.出版社  from (select * from a union all select * from b) t1
    where c.书 = t1.书
      

  4.   

    update c set 出版社ID=b.id
    from a ,b 
    where c.书=a.书 and a.书=b.书
      

  5.   

    上面试过了没一个对的.大家看清楚表里的字段吧.
    忘记说了,这是mysql.