Oracle Spool command and oracleSpool command
Run the spool command to copy the output results of SQL * plus to a specified file or query the results.
Send to the printer and use the spool off command until it is executed.
The spool command syntax is as follows:
Spool [file_name [create | replace | append] off | out]
File_name specifies an operating system file.
Create creates a specified file_name file.
Replace the specified file if it already exists.
Append the content to an existing file.
Off stops copying the output results from SQL * plus to the file_name file, and closes the file.
To copy the output structure in SQL * plus to file_name.
Example:
The query. SQL file does not exist in my computer's e drive.
Perform the following operations in SQL * plus:
Find the query. SQL file in my terminal brain drive and open it on behalf of you. The file content is as follows:
This file not only records the information of your query results, but also records your query statements.