日期:2014-05-18  浏览次数:20677 次

联表查询
select top 10 * from Bk_UserOrder where orderid not in (select top 10 orderid from Bk_UserOrder where 1=1 order by OrderId) 
and orderfid in (select fid from tb_office where fhid=71) order by orderid



我想对OrderHid字段相同,OrderFid字段不相同的数据进行分页要怎么该上面的语句?

------解决方案--------------------
SQL code

select top 10 * 
from Bk_UserOrder 
where not exists 
(select 1 from(select top 10 orderid from Bk_UserOrder where 1=1 order by OrderId)a
where a.OrderId<=b.OrderId)