首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

oracle 分页sql话语

2012-10-25 
oracle 分页sql语句------------------------------比较好用-------------------------------------------

oracle 分页sql语句

------------------------------比较好用--------------------------------------------------
select * from (select t.*,rownum as myrow
from (select e.*,rownum from v_wt2_chart e --order by pid 视图(view)使用后速度很慢
) t
where rownum <=60) where myrow>30

------------------------------视图的时候速度很慢-----------------------------------------
select * from
(select tt1.*,rownum rowno from (select * from V_WT2_CHART) tt1)
where rowno between 11 and 20


-------------------------只能用于table,view使用不了 ------------------------------------
select *
from (select rid
from (select rownum rn, rid
from (select rowid rid from b_wt2 o order by o.pid)
where rownum <= 20)
where rn >0) t1,
b_wt2 t2
where t2.rowid = t1.rid

热点排行
Bad Request.