Collections:
Save Query Output to a Local File in Oracle
How To Save Query Output to a Local File in Oracle?
✍: FYIcenter.com
Normally, when you run a SELECT statement in SQL*Plus, the output will be displayed on your screen. If you want the output to be saved to local file, you can use the "SPOOL fileName" command to specify a local file and start the spooling feature. When you are done with your SELECT statement, you need to close the spool file with the "SPOOL OFF" command. The following tutorial exercise gives you a good example:
SQL> connect HR/retneciyf SQL> SET HEADING OFF SQL> SET FEEDBACK OFF SQL> SET LINESIZE 1000 SQL> SPOOL \temp\employees.lst SQL> SELECT * FROM EMPLOYEES; ...... SQL> SPOOL OFF
You should get all records in employees.lst with fixed length fields.
⇒ Input Buffer in SQL*Plus in Oracle
⇐ Output Spooling in SQL*Plus in Oracle
2020-07-15, 4572🔥, 0💬
Popular Posts:
How To Select All Columns of All Rows from a Table in Oracle? The simplest query statement is the on...
How To Start the Command-Line SQL*Plus in Oracle? If you Oracle server or client installed on your w...
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...
How To Enter Unicode Character String Literals in SQL Server Transact-SQL? Unicode characters are mu...
How To Install Oracle Database 10g XE in Oracle? To install 10g universal edition, double click, Ora...