Sqlplus redirects the query results to a file and does not output to the screen:
Save the above SQL to a file, and then execute the file in a CMD window
Sql>@d:\xxx.sql
1 --number of characters per line2 SetLinesize80003 --This parameter sets the number of rows to output per page. N=0 indicates that no new page is generated4 SetPageSize05 --displays and copies the setting of the maximum width of a long type value, maximum value 2G6 Set Long 20000000007 --Sqlplus retrieves the increment size of a long type value. Because memory limits can be retrieved by incremental8 --a project at the time Plsql and Sqldeveloper have obvious network latency problems, sqlplus default is not a problem, after setting this parameter can also cause problems to reproduce9 SetLongchunksize9000000Ten --Settings for Columns One --col username format A4 A --col A format 999,999,999 - - --The headings (including text and underscores) for each column appear on the resulting report. the SetHeading on - --at the end of the query, the record count information for the query results is given. Suppress count feedback from last line - SetFeedbackif - --whether the command itself is displayed on the screen when the command file is executed + SetEchooff - --controls the display of output generated by a File Execution command + SetTermoutoff A --empty extra spaces, such as: Linesize too long at SetTrimout on - SetTrimspool on - SetTiming on - - --Production data Commands - spool e:\cott_spool_emp.txt; in SELECT * fromAttributeinstanceWHEREownerID= 'e9dcbee0-18ea-486f-93c4-ed9ce64e4685'; - --SELECT * from WorkItem where rownum < 5; toSpooloff;
Sqlplus redirect Query results to file, not output to screen