select id,employname,rownum from t1 where rownum<(select count(*)-30 from t1) minus select id,employname,rownum from t1 where rownum<(select count(*)-60 from t1);
是写错了,最后的where写成and了 select * from (select rownum rid,... from tab_name where rownum<60) where rid>30
select * from ( select rownum num, tablename.* from tablename ) where num>=30 and num<=60
select id,employname,rownum from t1 where rownum<(select count(*)-39 from t1) minus select id,employname,rownum from t1 where rownum<(select count(*)-69 from t1);昨天累了回复的数字错误,今天改过来了,ORACLE里是行的,我试过的了!!
select * from (select rownum rid,... from tab_name) WHERE RID BETWEEN 30 AND 60;
select * from (select rownum num,t.* from table_name t where rownum<=60) where num>=30应该可以的
select * from (select rownum row_num,A.* from YourTable a) WHERE row_num BETWEEN 30 AND 60;
select id,employname,rownum from t1 where rownum<(select count(*)-30 from t1)
minus
select id,employname,rownum from t1 where rownum<(select count(*)-60 from t1);
select * from (select rownum rid,... from tab_name where rownum<60) where rid>30
select rownum num, tablename.*
from tablename
)
where num>=30 and num<=60
minus
select id,employname,rownum from t1 where rownum<(select count(*)-69 from t1);昨天累了回复的数字错误,今天改过来了,ORACLE里是行的,我试过的了!!