本帖最后由 rjzou2006 于 2010-10-14 13:46:20 编辑

解决方案 »

  1.   

    动态执行:
    execute immediate 'select * from '||table_name;
      

  2.   

    先用游标查出user_tables下面的表。然后将表名带入 查询你想要的表就行了
      

  3.   


    --楼主参考一下。
     declare
      cursor test_cu is select * from tb_name;
      tb_re tb_name%rowtype;
     begin
      if test_cu%isopen = false then
       open test_cu;
      fi
      loop
      fetch test_cu into tb_re;
      dbms_output.put_line(tb_re.col);
      exit when test_cu%notfound;
      end loop;
      close test_cu;
     end;