一、随时间变化的输出文件:
col outputfilename new_value v_filename noprint;select to_char(sysdate,'yyyy-mm-ddpmhh24miss')||'UPDATE.LOG' outputfilename from dual;SPOOL &v_filename;...................SPOOL OFF注: COL的用法使用 help col
二、从环境变量中获取值:
WINDOWS下:SQL> spool %OS%.TXT;Started spooling to C:\Program Files\PLSQL Developer\Windows_NT.TXT