mysql比较恶心的一个delete in操作
mysql中
但是
解决办法是建立表别名
mysql中
delete from tableA where id not in (1,2,3)
是没有问题的delete from tableA where id not in (select id from tableB)
也是木有问题的但是
delete from tableA where id not in (select id from tableA )
就TMD有问题了解决办法是建立表别名
delete from tableA ( select * from (select id from tableA) t)