delete from 表名 where id not in (select top N id from 表名 order by id desc)
02
2025
04
SQL Server 保留最新N条数据,删除其他多余数据
作者:Chikoo | 分类:每日问 | 浏览:5 | 评论:0
delete from 表名 where id not in (select top N id from 表名 order by id desc)