当前位置:Gxlcms > 数据库问题 > SQL Server 分页SQL

SQL Server 分页SQL

时间:2021-07-01 10:21:17 帮助过:24人阅读

SELECT * FROM(SELECT ROW_NUMBER() OVER(order by Id DESC)AS rownum, 2 (SELECT COUNT(*) FROM Ana_Strategy WHERE UploadTime BETWEEN @EgyStatime AND @EgyEndtime )AS TotalCount, 3 * from Ana_Strategy) as t 4 WHERE t.UploadTime BETWEEN @EgyStatime AND @EgyEndtime 5 AND t.rownum BETWEEN @paGeSize *( @PageIndex -1)+1 and @PageIndex* @paGeSize

 

SQL Server 分页SQL

标签:strategy   index   order   from   rownum   pre   style   ges   select   

人气教程排行