select top 10 [LogID], [UserID] from TB_ActiveLog where LogID <
(select min(LogID) from (select top 10 LogID from TB_ActiveLog order by LogID DESC ) AS TBMinID) order by LogID DESC
这个是数据 倒排的时候 从第一条开始
select top 10 [LogID], [UserID] from TB_ActiveLog where LogID >
(select max(LogID) from (select top 10 LogID from TB_ActiveLog order by LogID ASC ) AS TBMinID) order by LogID ASC
select top 10 [LogID], [UserID] from TB_ActiveLog where LogID <
(select min(LogID) from (select top 10 LogID from TB_ActiveLog order by LogID DESC ) AS TBMinID) order by LogID DESC
select top 10 [LogID], [UserID], [TrueName] from TB_ActiveLog where LogID not in(select top 10 LogID from TB_ActiveLog order by LogID DESC ) order by LogID DESC
求m~n条
Select top (n-m+1) * From tab1 where id not in
(Select top m id from tab1 order by id)
order by id
================================================