I have a weird problem concerning DBMS_OUTPUT.PUT
- it is not printing data. I've tried these solutions:
1 - SET SERVEROUTPUT ON
2 - Enable DBMS_OUTPUT
and nothing works.
I have a weird problem concerning DBMS_OUTPUT.PUT
- it is not printing data. I've tried these solutions:
1 - SET SERVEROUTPUT ON
2 - Enable DBMS_OUTPUT
and nothing works.
pick dbms_output from the view menu. The window should pop open.
There is a plus sign on the window. Pick that and signin to the schema you are running in.
begin
dbms_output.put_line('hello world');
end;
When you run it, "hello world" should appear in the window.
Check this link and see if it is useful.
Could not add it as a comment due to reputation restriction.
Edited part starts here:
I executed the following in Oracle LiveSQL and here is how it works.
exec dbms_output.put_line('A' || CHR(10) || 'B'); --prints
begin
dbms_output.put('A');
dbms_output.put('B');
-- dbms_output.put_line(' '); --doesn't print
end;
begin
dbms_output.put('A');
dbms_output.put('B');
dbms_output.put_line(' '); --prints
end;
begin
dbms_output.put('A');
dbms_output.put('B');
dbms_output.new_line; --prints
end;
begin
dbms_output.put('A');
dbms_output.put('B');
dbms_output.put(''); --doesn't print
end;