Using Oracle 11g Express edition. For a project I need to have a document that contains all of my necessary SQL statements and outputs (a report of these), and an SQL file that contains ALL of my SQL statements that I have written during the project.
How do you set up these reports reporting into these documents ?
You can utilize spooling capability of SQLPlus
SQL>-- turn on writing query result to a file
SQL>spool c:\temp\myorareport.txt;
SQL>-- enter and execute your queries
SQL>select * from employees;
SQL>-- turn off spooling
SQL>spool off;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.