Oracle outputs query content to text

Source: Internet
Author: User

 

Output query content to text

Set echo off pagesize 0 heading off feedback off termout off

Spool test. SQL

Select count (*) from user_tables;

Spool off

 

After the preceding script is executed, the query content is output to test. SQL.

 

The set command in the first line sets the environment.

Which of the following parameters can be added or removed as needed?

 

 

Set time on // display time

 

Set colsep ''; //-domain output Separator

 

Set echo off; // display each SQL command in the start script. The default value is on

 

Set echo on // set whether to display the running command

 

Set feedback on; // set to display "XX rows selected"

 

Set feedback off; // display the number of records processed by this SQL command. The default value is on.

 

Set heading off; // output domain title, on by default

 

Set pagesize 0; // number of output lines per page. The default value is 24. To avoid paging, you can set the value to 0.

 

Set linesize 80; // output the number of characters in a line. The default value is 80.

 

Set numwidth 12; // The length of the output number field. The default value is 10.

 

Set termout off; // display the execution results of commands in the script. The default value is on.

 

Set trimout on; // Remove trailing spaces of each standard output line. The default value is off.

 

Set trimspool on; // remove the trailing space of each row from the redirection (spool) output. The default value is off.

 

Set serveroutput on; // set to allow display of output similar to dbms_output

 

Set timing on; // set to display "time in use: XXXX"

 

Set autotrace on-; // set to allow analysis of executed SQL statements

 

Set verify off // you can close or open the prompt to confirm the display of information old 1 and new 1.

 

This article is from the "richard's note" blog

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.