Loading

oracle 定义游标的时候使用变量作为表名

可以用 Ref cursor: 

Sql代码  
  type refcur_type is ref cursor;
  cur refcur_type;

begin
  open cur for ' select * from ' || table_name;
  然后再fetch cur 就可以用了。。。

 

posted @ 2016-02-23 15:49  stono  阅读(1406)  评论(0编辑  收藏  举报