ANSI SQL Extensions  «Prev 

Oracle Dynamic SQL

Oracle Spool Command
spool run_emp.sql;
  1. Spool the output of the command into run_emp.sql.
  2. Execute the SQL that uses the “||” function to create the syntax for our table display.
  3. Stop spooling.
  4. Now execute the SQL in the file that you have just created by entering @run_emp.

The default file name extension of files generated by the SPOOL command is .lst. To change this extension, specify a spool file containing a period (.). For example:
SQL> SPOOL query.txt