Showing posts with label dbms_output. Show all posts
Showing posts with label dbms_output. Show all posts

Wednesday, March 26, 2014

dbms_output in SQL Developer.



In sqlplus , you can shorten some of the SET options and it works the same as if the full command is issued. 

For example , to print the output from dbms_output , you can either use SET SERVEROUT ON or SET SERVEROUTPUT ON. 

SQL> set serverout on
SQL> begin
  2     dbms_output.put_line ('hello Zahir');
  3  end;
  4  /
hello Zahir

PL/SQL procedure successfully completed.

SQL> set serveroutput on
SQL> begin
  2     dbms_output.put_line ('hello Zahir');
  3  end;
  4  /
hello Zahir

PL/SQL procedure successfully completed.



But in SQL developer it expects the full text of the command . If you the first set of commands ( aka SET SERVEROUT ON) , you would get a warning message .

line 1: SQLPLUS Command Skipped: set serverout on
anonymous block completed


If you issue the latter , it works fine.