Oralce's Save command and OralceSave command
You can use the save () command to save the content of the current buffer to a file, so that even if the content in the buffer is overwritten,
The syntax for saving the current statement is also retained as follows:
Save [file] file_name [replace | create | append]
File_name indicates that the content of the SQL * PLUS buffer is saved to a file with file_name specified, and create indicates that
Create a file_name file and save the content in the buffer to the file. This option is the default value. Replace indicates
If file_name already exists, the content of the file_name file is overwritten. If the file does not exist, the file is created. Append
If the file_name file already exists, the content in the buffer is appended to the content of the file_name file. If
If the file does not exist, the file is created.
The specific operations are as follows:
SQL> select * from dept;
DEPTNO DNAME LOC
-------------------------------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> save query. SQL
File query. SQL has been created. At this time, go back to my D: \ oracle \ app \ Administrator \ product \ 12.1.0 \ dbhome_1 \ BIN
Find a query. SQL file with the following content:
Select * from dept
/
If you want to save the result to another place, you can specify the path when creating the result, for example, save e: \ query. SQL will be saved in e
You can also use savee: \ query. SQL replace in the disk directory;
Or save e: \ query. SQL append, which is not described here.