分页排序的SQL查询语句
T-SQL语句:
select * from (select row_number() over(order by id) as idx, T_A.* from T_A) as T_B where T_B.idx between (PageNum-1)*PageCount and (PageNum-1)*PageCount
eg:select * from (select ROW_NUMBER() over(order by ID) as idx,dbo.客户.* from dbo.客户) as b where b.idx between 1*10 and 2*10

浙公网安备 33010602011771号