SQLPLUS saving to file

对着背影说爱祢 提交于 2019-12-05 06:38:04

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!