2

I am trying to code PL/SQL in SQL Developer but it is not displaying the output. My program is compiling successfully. Here is the code:

set serveroutput on

declare
begin
    dbms_output.put_line('Hi');
end;

Please suggest what should I do to display the output? Is there any settings I need to change?

2 Answers 2

7

View->Dbms Output->Enable DBMS_OUTPUT for connection->OK Dbms output

1

It may not be appearing because you are on an older version of Oracle Database. Make sure you're on 11gR2 or higher.

And then as an alterntative to the previous answer, you can simply

set serveroutput on

declare
begin
    dbms_output.put_line('Hi');
end;

And then use the Execute as Script (F5) button on the worksheet toolbar.

Once serveroutput is set to 'on' we'll grab the DBMS_OUTPUT for you in the output panel anytime you run a Script.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.