Oracle – SQLPLUS Command Skipped: set serveroutput on;

oracleoracle-sqldeveloperplsql

In ORACLE SQL Developer, this gets execute when am trying to run procedure call with its output.

create or replace
procedure allparam_proc(name varchar2,nestedtable_param VARCHAR2_TT)
is
begin
   DBMS_OUTPUT.PUT_LINE('allparam_proc');
    FOR i IN nestedtable_param.FIRST..nestedtable_param.LAST LOOP
        DBMS_OUTPUT.PUT_LINE(nestedtable_param(i));
    END LOOP;
end;

Problem :

set serveroutput on;
declare
fruits VARCHAR2_TT := VARCHAR2_TT('Orange','Kumquat','Grape','Banana');
begin
    allparam_proc('leo',fruits);
end;

Output :

line 1: SQLPLUS Command Skipped: set serveroutput on;

Best Answer

In SQL Developer, Enabling serveroutput can be done via View -> Dbms Output

Using Semicolon is fine. But, Select what ever requires to be executed, and F5 (Execute as a Script) would be enough.

Good Practice, is to end every PL/SQL block with a / though the tool do it implicitly sometimes. Atleast it improves readability and continuity when the IDE has multiple anonymous PL/SQL blocks.

Answers here have great explanations in detail.

enter image description here