MySQL删除指定数量的数据

it2025-09-25  2

笔记时间:2020-10-22 11:00

方法一:MySQL不再支持IN子查询包含LIMI

delete from table where id in (select id from table where name = 'temp' limit 0,500);

方法二:解决方法一的问题

delete from table where id in (select t.id from (select id from table where name = 'temp' limit 0,500) as t);
最新回复(0)