我有一张表格,按ID排序并仅显示最新的30行。
我尝试使用下面的查询语句删除30个最新行后的任何行。
DELETE FROM table WHERE type = 'test' ORDER BY id DESC LIMIT 30, 60
我一直收到以下错误
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 60' at line 1
我做错了什么?
a
用作子查询的别名:https://dev59.com/nmUq5IYBdhLWcg3wHs6Y#14767216。谢谢。这对我帮助很大! - Derek