This topic created in 3947 days ago, the information mentioned may be changed or developed.
现在已经有两个想法:
一是,使用COUNT(*)将总数获取,再次执行 OFFSET startIndex ROWS FETCH NEXT pageSize ROWS ONLY获取分页的数据;
二是,在查询结果集中将总数的值付给结果集中的一列即:select top 10 *,(select count(1) from table) as count from table where ......。
求更好的方法。
 |
|
1
ylxb23 Jul 16, 2015
自顶一下,求大神路过 T_T
|