SQLPLUS saving to file
How do I have it save ALL my queries instead of just the last one typed?
SAVE saves the content of the SQL*Plus buffer into the file. The buffer gets replaced with every SQL statement that you write, hence you get only the last command. Save has an append
command that will append to the file.
So, first create your file.
save test.sql create
and append the file after every SQL script.
select * from employees/save test.sql append;select * from departments/save test.sql append;
and so on