xGss2000 发表于 2011-12-23 02:55

[原创]SERVEROUTPUT 和 DBMS_OUTPUB.ENABLE 区别

不解释,看结果:<br><br>SQL&gt; SET serveroutput ON<br>SQL&gt; ;<br>SQL&gt; BEGIN<br>&nbsp; 2&nbsp;&nbsp;&nbsp; dbms_output.enable();<br>&nbsp; 3&nbsp;&nbsp;&nbsp; dbms_output.put_line('HELLO');<br>&nbsp; 4&nbsp; END<br>&nbsp; 5&nbsp; ;<br>&nbsp; 6&nbsp; /<br>&nbsp;<br>HELLO<br>&nbsp;<br>PL/SQL procedure successfully completed<br>SQL&gt; SET serveroutput ON<br>SQL&gt; ;<br>SQL&gt; BEGIN<br>&nbsp; 2&nbsp;&nbsp;&nbsp; dbms_output.disable();<br>&nbsp; 3&nbsp;&nbsp;&nbsp; dbms_output.put_line('HELLO');<br>&nbsp; 4&nbsp; END<br>&nbsp; 5&nbsp; ;<br>&nbsp; 6&nbsp; /<br>&nbsp;<br>PL/SQL procedure successfully completed<br>SQL&gt; SET serveroutput OFF<br>SQL&gt; ;<br>SQL&gt; BEGIN<br>&nbsp; 2&nbsp;&nbsp;&nbsp; dbms_output.enable();<br>&nbsp; 3&nbsp;&nbsp;&nbsp; dbms_output.put_line('HELLO');<br>&nbsp; 4&nbsp; END<br>&nbsp; 5&nbsp; ;<br>&nbsp; 6&nbsp; /<br>&nbsp;<br>PL/SQL procedure successfully completed<br>SQL&gt; SET serveroutput OFF<br>SQL&gt; ;<br>SQL&gt; BEGIN<br>&nbsp; 2&nbsp;&nbsp;&nbsp; dbms_output.disable();<br>&nbsp; 3&nbsp;&nbsp;&nbsp; dbms_output.put_line('HELLO');<br>&nbsp; 4&nbsp; END<br>&nbsp; 5&nbsp; ;<br>&nbsp; 6&nbsp; /<br>&nbsp;<br>PL/SQL procedure successfully completed<br>
页: [1]
查看完整版本: [原创]SERVEROUTPUT 和 DBMS_OUTPUB.ENABLE 区别