我对某些列删除顶级N行顺序有一些困惑。
我创建的这里有一个例子Example at fiddle
这些查询有什么问题?
Delete Top(3) from Table1 order by id desc Delete Top(3) from Table1 where id IN (select id from Table1 order by id desc)
因为在MysqL中,limit关键字做得很好
解决方法
将顶部3子句添加到子选择中:
Delete from Table1 where id IN ( select top 3 id from Table1 order by id desc )