日期:2014-05-16 浏览次数:20697 次
select * from( select t.*, row_number()over(order by 排序字段) row_ from t where 查询条件的组合) where row_ >= 100 * (n-1) and row_ < 100 * n; --n是分页数
------解决方案--------------------
不能超过30分钟还不能满足吗?
SELECT * FROM more_employees; select * from( select more_employees.*, row_number()over(order by employee_id) row_ from more_employees ) where row_ > 5 * (n-1) and row_ <= 5 * n;
------解决方案--------------------
row_number()over 是MSSQL里面的语法。他问的是Oracle
select * from (select *,rownum hs from table ) a where a.hs between start and end
你试下这个。。