奇葩了,sqlserver分页时第五页数据和第六页数据一样
我用了order by 进行了排序,但是出来第五页和第六呀数据相同,怎么查也查不到原因,哪位遇到或者觉得可能性是什么,告知下我,感激不尽!!!!看图 用括号把这层条件括起来就行了。()就这样
哥们太感谢你了,原来就是这个括号的问题。但是你这样打括号出错了,应该是下面这样
select top 2 * from Chances where ChanID not in(
select top ((6-1)*2) ChanID from Chances
where (ChanState=3 or ChanState=4 or (ChanState=2 and ChanDueMan=1))
order by ChanID asc
) and (ChanState=3 or ChanState=4 or (ChanState=2 and ChanDueMan=1)) order by ChanID ascok我也谢谢你。。