例如要从数据库的第10条数据开始查询5条数据,SqlServer查询语句如下:
select top 5 * from table_name where id not in( select top 10 id from table_name order by id desc) order by id desc
例:
SELECT TOP 5 * FROM MES_MMS_MLOT WHERE MMS_MLOT_SID NOT IN ( select top 10 MMS_MLOT_SID from MES_MMS_MLOT order by MMS_MLOT_SID desc) order by MMS_MLOT_SID desc
原文:https://www.cnblogs.com/kelenote/p/14885399.html