- 问题:only a single result allowed for a SELECT that is part of an expression Unable to execute statement
解决:涉及到多个返回结果的语句
delete from TABLE_NAME where id in (select id from TABLE_NAMEwhere (select count(id) from TABLE_NAME) >=50 order by XXX asc limit 3);
SQL批量删除技巧
本文介绍了一种使用SQL语句批量删除特定条件下超过50条记录的方法,通过子查询和LIMIT关键字,有效地避免了因返回结果过多导致的错误,如only a single result allowed for a SELECT that is part of an expression。

被折叠的 条评论
为什么被折叠?



