In SQL* Plus, if the spool file already exists, SPOOL command will overwrite its contents by default. This is the same as using REPLACE option with SPOOL command.
SQL> SPOOL my_output.txt REPLACE
To add new query output to the end of an existing file (without replacing the existing data), use APPEND option.
SQL> SPOOL my_output.txt APPEND
No comments:
Post a Comment