Spool command about oracle
Use the spool command to copy the results of the output in sql*plus to a specified file, or to copy the results of the query
Send it to the printer until you use the spool off command directly.
The syntax of the spool command is:
Spool [file_name [create | replace | append] off | out]
Where file_name specifies an operating system file
Create will create a specified file_name file
Replace replaces the specified file if it already exists
Append appends the content to an existing file
Off stops copying the output from sql*plus to the file_name file and closes the file.
Out starts this function to copy the output structure from sql*plus to file_name.
Examples are as follows:
Then go to the contents of the a.sql file under / home/oracle