what is the use of SPOOL COMMAND
spool use
Collapse
X
-
Tags: None
-
There are various uses of the spool command. You can spool out to a file , then use normal SQL to get small reports with some formatting. For example
SQL> Spool /ora/spool.txt
SQL> select "List of employees drawing more than Rs 10000" from dual;
SQL> select EmpNo,Name from Emp where Salary > 10000;
SQL> spool off;
vi the spool.txt file and delete the "select" lines and hey ! u have a report ready.
A more practical use will be during database development when u are piping in a large amount of data and you need to disable some triggers. Experiment !!!Comment
Comment