delete数据时,不支持表别名
如:delete from test a;
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a' at line 1
当必须用表别名来过滤时,可用表名代替表别名
如:delete from test where exists(select b.id from test2 b where b.id=test.id);
如:delete from test a;
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a' at line 1
当必须用表别名来过滤时,可用表名代替表别名
如:delete from test where exists(select b.id from test2 b where b.id=test.id);