ITeye博客

update where in limit

zph999 · 2011-05-19 13:44 · 数据库 · Markdown

update tb1 a set a.end_date ='2011-05-23' where a.id = ( select h.id from ( select id from tb2 history where history.adsite_id =141 and history.en_id=7 order by history.id desc limit 0,1 ) as h )

update的子条件中不能直接带 limit关键字,可以在外围套一层。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。