Oracle SQLPlus Query Output to a File
| Posted by watashii | Filed under Database, Programming, UnixHere is a simple way to output SQL query output into a file, via command line based SQLPlus.
Step 1: Nominate the output file location. In this case this is a Unix location.
SQL> spool /tmp/output.txt
Step 2: Perform your SQL query.
SQL> select * from tab;
Step 3: Close the file.
SQL> spool off
