每页10个记录,查询出第2页的记录

如果不带查询条件:

select top 10  * from WorkRecord
  where (Id not IN (select top (10 * 2) Id FROM WorkRecord))

如果带查询条件

select top 10  * from (select * FROM WorkRecord
  where (CatchTime > '2013/11/18 0:00:00' and CatchTime < '2013/12/18 23:59:59')) tag
  where (tag.Id not IN (select top (10 * 2) tag1.Id FROM (select * FROM WorkRecord
  where (CatchTime > '2013/11/18 0:00:00' and CatchTime < '2013/12/18 23:59:59')) tag1))

相关文章:

  • 2021-08-04
  • 2021-11-19
  • 2022-01-01
  • 2022-12-23
  • 2021-12-18
  • 2021-12-18
  • 2022-12-23
猜你喜欢
  • 2021-12-18
  • 2021-11-03
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案