You can't specify target table 't_mail_marketing' for update in FROM clause

update t_mail_marketing set `STATUS` = 1 where ID in (

select b.PARENT_ID from (SELECT DISTINCT a.PARENT_ID from t_mail_marketing a where a.`STATUS`=1 and a.PARENT_ID IS NOT NULL and a.PARENT_ID>0)b

)

  

posted @ 2018-04-25 17:31  wanhua.wu  阅读(93)  评论(0编辑  收藏  举报