建索引了吗?
这样行不行?
select * from (select nownum idnum,* from table) where idnum >6000000 and idnum<700000;要一次性取那么多?负担好重咯!
这样行不行?
select * from (select nownum idnum,* from table) where idnum >6000000 and idnum<700000;要一次性取那么多?负担好重咯!
select t.*,rownum rn from (
select t.* from tname t order by id
) t
)
where rn >= 600000
and rn < 700000Thanks
Hima
(select * from
(select rownum as rid,a.* from table a order by id)
where rid <= 700000
) where rid >= 600000
或
select top 100000 * from table where id not in(select top 500000 id from table order by id)
select * from
(select rownum as rid,a.* from table a where rownum <= 700000 order by id)
where rid >= 600000
create table copy_table as select * from table where rownum<70000;
delete from copy_talbe where rownum<60000;