Reputation: 23
SET SERVEROUTPUT ON;
DECLARE
var_test1 VARCHAR2(30) := 'RebellionRider';
BEGIN
DBMS_OUTPUT.PUT_LINE (var_test1);
END;
Whenever im running the above code im getting the following error. Im using oracle apex to run my code. how to solve it?
Error:-
ORA-00922: missing or invalid option
BEGIN
DBMS_OUTPUT.PUT_LINE (var_test1);
END;
Upvotes: 0
Views: 600
Reputation: 16
When you are on developer environment, you can to select only the text you want run, so press F5 or click run. This will also working.
Upvotes: 0
Reputation: 142705
As you use Apex, where exactly did you run that code? It works just fine in its SQL Workshop (SQL Commands).
Just remove SET SERVEROUTPUT ON
, it is SQL*Plus command to enable the output, it is
Upvotes: 5