To create a flat file with SQL*Plus, you first must enter the following SET commands: SET NEWPAGE 0 SET SPACE 0 SET LINESIZE 80 SET PAGESIZE 0 SET ECHO OFF SET FEEDBACK OFF SET HEADING OFF SET MARKUP HTML OFF SPOOL OFF After entering these commands, you use the SPOOL command as shown in the previous section to create the flat file.
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET MARKUP HTML OFF SPOOL OFF
After entering these commands, you use the SPOOL command as shown in the previous section to create the flat file.
SQL> spool off;
SQL> spool c:\test.txt;
SQL> select code from comm_codeinfo where type='INBOUND';CODE
----------------------------------------
INBOUND-8
INBOUND-3
INBOUND-4
INBOUND-5
INBOUND-6
INBOUND-7
INBOUND-99
INBOUND-1
INBOUND-2已选择9行。SQL> SPOOL OFF;现在你可以查看c:\test.txt文件了。