Monday, January 9, 2012

Oracle Spool Command (Output To File)

You can use Oracle SPOOL command to output of a query in SQL Plus in Oracle to an output file.


Below is an example.


SQL> Spool on
SQL> Spool c:\abc.log
SQL> Query
SQL> Spool off



Spool the output to a file without column names included.



SQL> Spool on
SQL> set heading off 
SQL> Spool c:\abc.log
SQL> Query
SQL> Spool off



No comments:

Post a Comment