spool
set line 1000;
set head off
set echo off
set feed off
set heads off
set pages 50000
SET NEWPAGE NONE
spool bb.txt
SELECT A.FMONITORCODE
FROM tb_test A
WHERE A.YMPH='2021040044C' and A.FSTATIONCODE='123456'
and FSHOTDATED='2021-05-16';
spool off;
可以适当调整set line 1000;
导出package和body
set line 1000;
set head off;
set echo off;
set feed off;
set heads off;
set pages 50000;
spool aa.txt;
select text from all_source where name=upper('deal_Data_Pkg') and type = 'PACKAGE' and owner='HXL' order by line;
select text from all_source where name=upper('deal_Data_Pkg') and type = 'PACKAGE BODY' and owner='HXL' order by line;
spool off;