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, 3826🔥, 0💬
Popular Posts:
How REAL and FLOAT Literal Values Are Rounded in SQL Server Transact-SQL? By definition, FLOAT(n) sh...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...
How To Convert Numeric Values to Character Strings in MySQL? You can convert numeric values to chara...
How to calculate the storage size of a JSON (JavaScript Object Notation) value using the JSON_STORAG...