1. 程式人生 > >You can't specify target table 't_mail_marketing' for update in FROM clause

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

update in table use pre RKE can stat mail date

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

)

  

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