Oracle PL/SQL Tutorial/SQL PLUS Session Environment/serveroutput
Содержание
serveroutput controls whether your DBMS_OUTPUT.PUT_LINE calls go into the bit bucket
SQL>
SQL> set serveroutput on size 1000000 format wrapped
SQL>
SQL>
set serveroutput on format truncated
SQL>
SQL>
SQL> set serveroutput on format truncated
SQL> exec dbms_output.put_line( " Hello World !!!!!" );
Hello World !!!!!
PL/SQL procedure successfully completed.
SQL>
set serveroutput on format word_wrapped
SQL>
SQL>
SQL> set serveroutput on format word_wrapped
SQL> exec dbms_output.put_line( " Hello World !!!!!" );
Hello World !!!!!
PL/SQL procedure successfully completed.
SET SERVEROUTPUT ON for PL/SQL
SQL>
SQL> SET ECHO ON
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 age NATURAL;
3
4 BEGIN
5 age := 10;
6 DBMS_OUTPUT.PUT_LINE("age:");
7 DBMS_OUTPUT.PUT_LINE(age);
8 END;
9 /
age:
10
PL/SQL procedure successfully completed.
SQL>
set serveroutput on size 1000000;
SQL>
SQL> set serveroutput on size 1000000;
SQL>
Setting up the server to communicate
By default, server output is turned off.
Set serveroutput on