标签:mysql
delete from t where userid in (select userid from t where userid < 10);
ERROR 1093 (HY000): You can‘t specify target table ‘t‘ for update in FROM clause
delete from t where userid in (select userid from (select userid from t where userid < 10) tmp );
Query OK, 2 rows affected (0.02 sec)
本文出自 “dba天空” 博客,请务必保留此出处http://9425473.blog.51cto.com/9415473/1664022
不允许在子查询的同时删除原表数据(ERROR 1093 (HY000))
标签:mysql
原文地址:http://9425473.blog.51cto.com/9415473/1664022