Oralce's Save command and OralceSave command

Source: Internet
Author: User

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.