在ORACLE的过程中,我创建一个表,在存储过程中我怎么样才能调用这个表??

mysine 2003-03-27 10:25:06
在ORACLE的过程中,我创建一个表,在存储过程中我怎么样才能调用这个表??
如:
create or replace test
is
str varchar2(200);
begin
str := 'create table a as select * from b';
execute immediate str;
commit;
在下面我用什么样的语句可以调用a,也就是取出a表中的记录数
end;
http://expert.csdn.net/Expert/topic/1582/1582439.xml?temp=.111706
...全文
41 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
mysine 2003-03-27
  • 打赏
  • 举报
回复
问题已经解决,谢谢!
zhangxishi 2003-03-27
  • 打赏
  • 举报
回复
先定义个变量
RNum Number;
用Select count(*) into RNum from a;
不就行啦
beckhambobo 2003-03-27
  • 打赏
  • 举报
回复
create or replace test(p_num out number)
is
str varchar2(200);
begin
str := 'create table a as select * from b';
execute immediate str;
select count(1) into p_num from a;
end;

17,377

社区成员

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

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