PL/SQL command not properly working though successfully completed

Viewed 48

I have written a simple PL/SQL command of printing hello world to console but it prints nothing and still message is prompted that PL/SQL procedure successfully completed. I am not able to figure it out as to what to do in this case? Code:

BEGIN

dbms_output.put_line ('Hello World..');

END;

OUTPUT:

1 Answers

You're missing the set serveroutput on.

This is what you have:

SQL> begin
  2    dbms_output.put_line('Hello world');
  3  end;
  4  /

PL/SQL procedure successfully completed.

This is what you should have:

SQL> set serveroutput on             --> this
SQL> begin
  2    dbms_output.put_line('Hello world');
  3  end;
  4  /
Hello world                          --> here's the result

PL/SQL procedure successfully completed.

SQL>
Related