create or replace procedure test (table_name varchar2)
as
type ref_cursor is ref cursor;
cursor_table ref_cursor;
tablename varchar2(100);
begin
tablename := table_name;
open cursor_table for select * from tablename;
close cursor_table;
end test;
/
as
type ref_cursor is ref cursor;
cursor_table ref_cursor;
tablename varchar2(100);
begin
tablename := table_name;
open cursor_table for select * from tablename;
close cursor_table;
end test;
/
解决方案 »
- 删除除重复的数据,并保留一行
- 请教一个关联不上的sql怎么写
- oracle问题
- ado连oracle,找了很久找不到解决办法
- 出现ORA-12545:连接因对象主机或对象不存在而失败这样的问题,请专家指点
- 求教 oracle rac windows 2003 用户"administrator"等同用户检查失败 的错误
- 在oracle中如何创建临时表?
- 关于自动生成一个唯一编号做主健的问题。
- sql server 中基础概念 如何和oracle中的对应起来,和谁对应?up 有分
- 求一个oracle 64位 obdc 驱动安装程序
- 高分征求解答,如何将Oracle数据库中的图片批量导出,在线等
- 急急!! 插入数据的问题???——————在线等待
你写的编译有错的
我根据dinya2003大哥所教的将其修改为
create or replace procedure test (table_name varchar2)
as
type ref_cursor is ref cursor;
cursor_table ref_cursor;
tablename varchar2(100);
ssql varchar2(100);
begin
tablename := table_name;
ssql:='select * from '||tablename||'';
open cursor_table for ssql;
close cursor_table;
end test;
才没出错
我的问题解决了,谢谢