spool a.log
select * from .....
spool off

解决方案 »

  1.   

    for num in 1..9 loop
    execute immediate 'create table :1 as select tel,decode(.........) col1 ..... from :2'
    using 'aa_'||num,'bb_'||num;
    end loop;
      

  2.   

    1.用spool c:\a.log 可以,用pl/sql developer等工具把数据查询出来,然后另存为文本也可以.2.用循环动态语句来实现.
      

  3.   

    spool c:\a.txt
    select * from tablename;
    spool off;
      

  4.   

    用spool 太慢了吧,这几百万行的,恐怕有点不现实。
      

  5.   

    for num in 1..9 loop
    execute immediate 'create table :1 as select tel,decode(.........) col1 ..... from :2'
    using 'aa_'||num,'bb_'||num;
    end loop;
    这个能不能介绍详细点 那个1,2指的是什么,我运行了,提示:无效的sql语句