This question already has an answer here:
I'm just getting into PL/SQL, and I tried to run the following code, and I am getting anonymous block completed, but I think I should be getting Testing output. Does any know what I am doing wrong?
DECLARE
message varchar2(20) := 'Testing output';
BEGIN
dbms_output.put_line(message);
END;
/
`The following statement will give the possible solution try this out
Then Run this code will get the following output
end; /
The code will give the following output
value of c: 30 value of f: 23.3333333333333333333333333333333333333
PL/SQL procedure successfully completed.
Yes, in Oracle SQL Developer put the statement:
just before your
DECLARE
keyword and this should work.I couldn't find
View -> DBMS Output
and I'm using version 1.5.5.Viewing the DBMS_OUTPUT depends on the program.
SQL*Plus and Oracle SQL Developer
Run
SET SERVEROUTPUT ON;
first. This is all that's necessary in SQL*Plus or recent versions of Oracle SQL Developer.PL/SQL Developer
Output is automatically detected and displayed in the "Output" tab.
Yes, this is correct. You need to use before this block:
SET SERVEROUTPUT ON
Then, message get displayed on window.
Else we can check in SQL Developer
select "View" -> "DBMS Output"
.and in
PLSQL developer
under theOutPut
tab we can check message.This will give you the output
If you are getting "anonymous block completed" while executing the procedure by typing "EXECUTE ;" then run the below command & again execute the procedure. command is
SET SERVEROUTPUT ON;