我的表是这样定义的 test(id,value)
下面这句话应该怎么改啊
--設置屏幕顯示
set serveroutput on;
--測試遊標
declare
type cur_type is ref cursor;
cur cur_type;
rec emp%rowtype;
str varchar2(50);
begin
str:= 'select ename from emp';
open cur for str;
loop
fetch cur into rec.ename;
exit when cur%notfound;
dbms_output.put_line(rec.ename);
end loop;
end;