你可以使用动态游标:
create or replace procedure tmptest is
type c_cursor is ref cursor;
c_mycursor c_cursor;
v_sql string(1000);
begin
v_sql:='create table...';
execute ...
open c_cursor for 'select ... from table_name';
...
end tmptest;
create or replace procedure tmptest is
type c_cursor is ref cursor;
c_mycursor c_cursor;
v_sql string(1000);
begin
v_sql:='create table...';
execute ...
open c_cursor for 'select ... from table_name';
...
end tmptest;
解决方案 »
- 断电导致oracle问题
- 急求一条SQL语句,实现以下需求
- 请问一下,下面两个有什么区别?
- 无法登陆OMS
- @@@@@@@@@@@@@@求一SQL语句,在线等,非常感谢!
- 块block的意义
- 提示错误如下:ORA-01219:数据库未打开:仅允许在固定表/视图中查询。
- 在ORACLE中如何访问其他用户的表或者视图???
- 我怎样才能在oracle enterprise manager 上登陆?
- oracle 验证函数约束。(求大神帮忙~)
- The Network Adapter could not establish the connection是什么错误
- oracle8.1.7使用OEM自动备份,出现了如下ORA-19504错误,请各位高手救命!
像 jiezhi那样做法,建立游标变量。