分页过程的问题????
我知道分页过程的公式是这样:
select top @pagesize * from tbname where tbid not in(select top @pagesize*(@currentpage-1) tbid from tbname)
倘若我要加条件的话:
A---select top @pagesize * from tbname where tbid not in(select top @pagesize*(@currentpage-1) tbid from tbname) and uname like '%杨%'
B---select top @pagesize * from tbname where tbid not in(select top @pagesize*(@currentpage-1) tbid from tbname where uname like '%杨%' )
那我用A正确还是用B正确???也就是说条件是加里面还是加外面???