一个简单的CURCOR问题,解决给50分

helpall 2003-09-14 06:24:01
....
declare
CURSOR c is
select 'select' || xxx || ' from yyy;' into value
from zzz
where ...;
c1 is c%ROWTYPE;

begin
...
for loop
??? how to execute the c's result here???
end;
...全文
74 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
helpall 2003-09-14
  • 打赏
  • 举报
回复
请到
http://expert.csdn.net/Expert/topic/2257/2257817.xml?temp=.5137751
拿分。
beckhambobo 2003-09-14
  • 打赏
  • 举报
回复
declare
type t_sor is ref cursor;
v_sor t_sor;
str varchar2(50);
begin
str:='select '||xxx||' from yyy';
open v_sor for str;
loop
fetch v_sor into value;
when v_sor%notfound then exit;
dbms_output.put_line(value);
end loop;
end;
/
helpall 2003-09-14
  • 打赏
  • 举报
回复
up.

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧