我想用java取整张表的数据,用过程取 效果跟 select * from emp 一样 过程该怎么写?
create or replace procedure usp_test as
cursor cu is select * from emp;
v_row emp%rowtype;
begin
open cu;
loop
fetch cu into v_row;
exit when cu%notfound;
dbms_output.put_line(v_row.empno||' '||v_row.ename);
end loop;
close cu;
end;
我是这样写的 有什么不对
...全文
618打赏收藏
oracle 过程取数据问题 急急急,在线等
我想用java取整张表的数据,用过程取 效果跟 select * from emp 一样 过程该怎么写? create or replace procedure usp_test as cursor cu is select * from emp; v_row emp%rowtype; begin open cu; loop fetch cu into v_row; exit when cu%notfound; dbms_output.put_line(v_row.empno||' '||v_r
[Quote=引用 4 楼 shadow1986a 的回复:]
create or replace function usp_test
RETURN SYS_REFCURSOR
is
mycur sys_refcursor;
begin
open mycur for select * from all_tables;
return mycur;
end;