表可以自己起名字,只要实现就行 select * from (select t.*,rownum flag from table t order by 成绩 desc ) where flag >= 10 and flag <= '20' rownum > 某个数字 OR rownum = 非1的数字 都是不合法的吧 select * from ( select b.* ,rownum as rn from (select t.* from table t where 成绩>=60 order by 成绩 desc )b) where rn<=20 and rn>=10 前提:及格的行数要超过20行 SQL code: select * from (select rownum rn,成绩 from 表名 where 成绩 >= 60 order by 成绩 desc) where rn >= 10 and rn <= 20
SQL code:
select * from (select rownum rn,a.* from tb a where a.cj>=60 order by cj desc) where rn>=10 and rn<=20