是重写此查询的一种方法,因此我不会收到此消息。 This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'

DELETE FROM city WHERE id IN (SELECT id FROM city_data LIMIT 10000);

有任何想法吗?

===============>>#1 票数:1

您可以将查询更改为

DELETE
FROM city 
WHERE id IN (SELECT id FROM city_data )
LIMIT 10;

===============>>#2 票数:0

如果不是必须的限制,则可以

 delete c.* 
 from city as c
 inner join city_data as cd on cd.id = c.id;

  ask by Patrioticcow translate from so

未解决问题?本站智能推荐: