mysql update不能直接使用select的结果

在sql server中,我们可是使用以下update语句对表进行更新:
update a set a.xx= (select yy from b) ;
但是在mysql中,不能直接使用set select的结果,必须使用inner join:
update a inner join (select yy from b) c set a.xx = c.yy

posted @ 2012-12-18 15:41  phpbin  阅读(386)  评论(0编辑  收藏  举报