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