Online Tutorials & Training Materials | STechies.com
Register Login

How to Execute the dbms_out.put_line Statement?

|| || 2

How to Execute the dbms_out.put_line Statement?
Stechies

Hello SAP Expert friends,
I need your help as I won't able to execute the all there dbms_out.put_line statement. Below code is not able to execute last statement. So please tell me how I should write it. Please try to give me a simple explanation.
Create or replace procedure p1(a number,b number)
is
c number(10);
begin
dbms_output.put_line(a);
dbms_output.put_line(b);
c=a/b;
dbms_output.put_line(c);
exception
when divided_zero then
dbms_output.put_line('Error');
end;
begin
exec p1(10,0);
end;
if error is raised then I also won't able to execute the complete code from top to bottom?

Thanks in Advance!


Comments

  • 18 Aug 2015 12:14 pm

    If you are using sql developer then use set serveroutput on; if toad then in settings you have to use view output or something similar.

  • 18 Aug 2015 12:15 pm

    Even if you are using prompt, even serveroutput on it has to be used.

Related Articles