Reputation: 2055
I am new to PL/SQL, I have ran a simple command of Hello world in my command prompt.
DECLARE
message varchar2(20):= 'Hello, World!';
BEGIN
dbms_output.put_line(message);
END;
/
But The hello world did not get displayed in CMD although I am getting the message PL/SQL procedure successfully completed message. Please help out!
Upvotes: 1
Views: 1070
Reputation: 1
We can write pl/SQL in workspace and execute easy. Example hello world
Set serveroutput on
Declare
message varchar 2(20):='Hello world';
Begin
dbms_output.put_line(message);
End;
/
Result will give Hello world Pl/SQL procedure successfully completed .
Upvotes: 0
Reputation: 5072
use the below sqlplus command to display the output of dbms_output.put_line
set serveroutput on
before running the anonymous block
Upvotes: 0
Reputation: 2827
SET SERVEROUTPUT ON
will help you to print messages from buffer to your CMD...
so try,
SET SERVEROUTPUT ON
DECLARE
message varchar2(20):= 'Hello, World!';
BEGIN
dbms_output.put_line(message);
END;
/
Upvotes: 5