delete from stu_info s1 where s1.password =(select s2.password from stu_info s2 where s2.password='123456')例如这个语句 我就是执行不了吖 发生错误
ERROR 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 'where s1.password =(select s2.password from stu_info s2 where s2.password='12345' at line 1
ERROR 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 'where s1.password =(select s2.password from stu_info s2 where s2.password='12345' at line 1
delete from stu_info where password =(select s2.password from stu_info s2 where s2.password='123456');或使用别名:delete s1 from stu_info s1 where s1.password =(select s2.password from stu_info s2 where s2.password='123456')
[root@localhost:3306] ERROR 1093: You can't specify target table 'stu_info' for update in FROM clause