select * from (select * from gjyl order by gdate desc) where rownum<=5 order by gdate 这样才对,你那样的顺序有点错误, 不过还是谢谢你,是你提醒了我,万分感谢大哥你了,呵呵
select * from (select * from gjyl order by gdate desc) where rownum<=5 order by gdate 大妹子,你这样写的语句和你的问题不太符合啊~
create or replace procedure test is nBegin number; nEnd number; Cursor C1 is select * from ( select rownum rm,a.* from (select rybh,xm,csrq from ryjbxxb) a where rownum<=nBegin ) where rm>nEnd order by csrq; begin select count(rowid) - 5 as a, count(rowid) as b into nBegin, nEnd from ryjbxxb; for aa in C1 Loop dbms_output.put_line(aa.xm); end loop;
end; /=====================================================set serveroutput on begin test; end; /
where rownum<=5 order by gdate
这样才对,你那样的顺序有点错误,
不过还是谢谢你,是你提醒了我,万分感谢大哥你了,呵呵
where rownum<=5 order by gdate 大妹子,你这样写的语句和你的问题不太符合啊~
create or replace procedure test
is
nBegin number;
nEnd number;
Cursor C1 is select * from
(
select rownum rm,a.* from
(select rybh,xm,csrq from ryjbxxb) a
where rownum<=nBegin
)
where rm>nEnd
order by csrq;
begin select count(rowid) - 5 as a, count(rowid) as b into nBegin, nEnd from ryjbxxb; for aa in C1 Loop
dbms_output.put_line(aa.xm);
end loop;
end;
/=====================================================set serveroutput on
begin
test;
end;
/