oracle spool

sqlplus WIS_ENTER/WIS_ENTER@DATABASENAME @e:\123.sql


sql  脚本

SET NEWPAGE NONE 
SET HEADING OFF 
SET TERM OFF
SET SPACE 0 
SET PAGESIZE 0 
SET TRIMOUT ON 
SET TRIMSPOOL ON
SET LINESIZE 2500
set feedback off
set echo off
SET VERIFY OFF
column v_date new_value filename; 
select 'device__' || to_char(sysdate-1,'yyyy_MM_dd') || '.txt' v_date from dual; 
spool e:\&&filename              
select device_id from statistics_item where device_id is not null; 
spool off;
exit;



你可能感兴趣的:(oracle spool)