ANSI SQL Extensions
Oracle Dynamic SQL
- Spool the output of the command into run_emp.sql.
- Execute the SQL that uses the “||” function to create the syntax for our table display.
- Stop spooling.
- 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