select term_code,company_id from(select a.term_code,a.company_id,rownum rn from ecc_imr_term a,distributer b where a.distributer_id=b.distributer_id and b.node_id = '20' and a.sts = 'A' and ((term_code between 2500 and 2649) or (term_code between 3000 and 3999))) where rn>180 and rownum<61rn rownum要怎么看啊这个sql语句?
ORACLE分页sql要怎么理解会比较清楚点啊
ORACLE分页sql要怎么理解会比较清楚点啊
from (
select term_code,company_id, rownum rn
from (
select a.term_code,a.company_id
from ecc_imr_term a,distributer b
where a.distributer_id=b.distributer_id and b.node_id = '20' and a.sts = 'A'
and ((term_code between 2500 and 2649) or (term_code between 3000 and 3999))
)
where rownum < 180 + 61
)
where rownum > 180