Printing the Results of Your Query

The results of your query are permanently captured by using the SPOOL command. This command causes SQL*Plus to begin writing all screen output to an external file. SQL*Plus will continue to output to the file until the SPOOL OFF command is issued. The external file that the SPOOL command created can then be printed using any Windows software, such as Notepad, Word, or WordPerfect. If you would like to stop the spooling process and print the output, use the SPOOL OUT command.

The command can be entered as a line command, selected from the File/Spool menu option, or it can be placed inside the query file. The following is the syntax of the command:

				Spool
				filename
				Spool c:/test.txt
			

Chapter 11 has a more complete ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.