select * from(select top 50 * from(select top 100 comCode,max(id) as id,qymc,isnull(phone,'11') as phone from clients group by comCode,qymc,phone ORDER BY phone)t1 order by phone desc)t2 order by phone 我这么改了还是一样分页没效果!!
多加个排序列。 直到保证每条记录能有一个固定的位置。A B null 1 null 2同时用 order by A,B
直到保证每条记录能有一个固定的位置。A B
null 1
null 2同时用 order by A,B