How you save Query output to a Local File?
Submitted by: AdministratorNormally, 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/retneclgg
SQL> SET HEADING OFF
SQL> SET FEEDBACK OFF
SQL> SET LINESIZE 1000
SQL> SPOOL empemployees.lst
SQL> SELECT * FROM EMPLOYEES;
......
SQL> SPOOL OFF
You should get all records in employees.lst with fixed length fields.
Submitted by:
SQL> connect HR/retneclgg
SQL> SET HEADING OFF
SQL> SET FEEDBACK OFF
SQL> SET LINESIZE 1000
SQL> SPOOL empemployees.lst
SQL> SELECT * FROM EMPLOYEES;
......
SQL> SPOOL OFF
You should get all records in employees.lst with fixed length fields.
Submitted by:
Read Online Oracle Database Developer Job Interview Questions And Answers
Top Oracle Database Developer Questions
☺ | How you can Download Oracle Database 10g XE? |
☺ | Explain Oracle Server Autotrace in Oracle? |
☺ | Explain Parameter File in Oracle? |
☺ | Explain System Global Area (SGA) in Oracle? |
☺ | Explain Initialization Parameter File in Oracle? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |