一句SQL语句解决倒序数据分页提取

此解决方案可能比不上网上那些大段代码的store procedure的性能(性能测试我就免了),我以前也写过那样的Store Procedure或C#代码,不过简单就是美,简单就是高效。以下例子仅供大家参考:

一句SQL语句解决倒序数据分页提取select top 3 PrintObject,PrintOperator,OperateTime from PrintRecord where (PrintId < ALL ( select top 6 PrintId from PrintRecord order by PrintId desc)) order by PrintId desc


以上3是DataGrid中的PageSize,6是DataGrid中的 PageSize × CurrentPageIndex

相关文章:

  • 2021-09-29
  • 2021-12-18
  • 2022-01-06
猜你喜欢
  • 2022-12-23
  • 2021-12-28
  • 2021-12-27
  • 2021-10-01
  • 2021-12-18
  • 2022-01-06
相关资源
相似解决方案