mysql不能删除表的数据,其中含有这个表的条件

You can't specify target table 'a' for update in FROM clause 使用delete语句错误

添加中间表

         错误使用
    delete from a where id in (
        select id from a where id='1'
    )
         添加中间表
    delete from a where id in (
        select b.id from (select id from a where id='1') b
    )         

 

https://blog.csdn.net/qq_29672495/article/details/72668008

posted @ 2020-03-17 10:51  YaY-G  阅读(210)  评论(0编辑  收藏  举报