Oracle Spool command and oracleSpool command

Source: Internet
Author: User

Oracle Spool command and oracleSpool command

Run the spool command to copy the output results of SQL * plus to a specified file or query the results.

Send to the printer and use the spool off command until it is executed.

The spool command syntax is as follows:
Spool [file_name [create | replace | append] off | out]


File_name specifies an operating system file.

Create creates a specified file_name file.
Replace the specified file if it already exists.
Append the content to an existing file.
Off stops copying the output results from SQL * plus to the file_name file, and closes the file.
To copy the output structure in SQL * plus to file_name.


Example:

The query. SQL file does not exist in my computer's e drive.

Perform the following operations in SQL * plus:

Find the query. SQL file in my terminal brain drive and open it on behalf of you. The file content is as follows:


This file not only records the information of your query results, but also records your query statements.

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.