我正在运行查询以删除重复的条目。它在没有LIMIT语句的情况下工作,但会重载服务器。我想用LIMIT语句批量处理它。MySQL DELETE加入获取语法错误与LIMIT语句
DELETE t1
FROM data as t1
join data as t2
WHERE t1.type = t2.type
AND t1.timestamp = t2.timestamp
LIMIT 100
并与LIMIT语句收到错误:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 100' at line 6
这并不完全相同的行为。在我的,如果限制工作,它将是100发现重复。这个版本需要很多后端支持来正确处理所有记录,同时处理删除的记录。 – RobC
如果你不需要重复..使用不同的..在子选择...答案更新..所以你删除100没有重复..值 – scaisEdge