Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute immediate dbms_output.put_line

I have code like this:

set serveroutput on

declare
v_str varchar2(200);
begin
v_str := q'!dbms_output.put_line('Hello world');!';
Execute immediate v_str;
end;

Oracle SQL Developer says that there's invalid SQL Statement, what's the problem?

like image 633
David Kakauridze Avatar asked Apr 19 '26 22:04

David Kakauridze


1 Answers

declare
v_str varchar2(200);
begin
v_str := q'!begin dbms_output.put_line('Hello world'); end;!';
Execute immediate v_str;
end;
/

works...

like image 131
wolφi Avatar answered Apr 21 '26 12:04

wolφi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!