how to run pl/sql program in oracle sql developer
Assuming you already have a connection configured in SQL Developer:
- from the
View
menu, selectDBMS Output
- in the DBMS Output window, click the green
plus
icon, and select your connection - right-click the connection and choose
SQL worksheet
- paste your query into the worksheet
- run the query
I have tried following the steps shown in this image. Some steps are excluded but I am sure you will understand when you encounter them.
First execute 'set serveroutput on' query in worksheet then check in View menu, DBMS output option will appear.
If you do not see DBMS output just add
set serveroutput on
at the top and execute the statements as a script, you will see the output in "Script output" section.
set serveroutput on
DECLARE
message varchar2(20):= 'Hello, World!';
BEGIN
dbms_output.put_line(message);
END;