Hi All,
I am writing prompt so that i can pass a variable during run time . I am executing it in sql developer code and getting the following message .Is it happens only in Sql developer. My code atlast will be executed in sql plus . Will the same error i will get in sql plus . Please kind your advice;
Code :
set serveroutput on
accept vstring prompt "Please enter your name: ";
declare
v_line varchar2(40);
begin
v_line := 'Hello '||'&vstring';
dbms_output.put_line(v_line);
end;
/
Output :
old:declare
v_line varchar2(40);
begin
v_line := 'Hello '||'&vstring';
dbms_output.put_line(v_line);
end;
new:declare
v_line varchar2(40);
begin
v_line := 'Hello '||'Uday';
dbms_output.put_line(v_line);
end;
PL/SQL procedure successfully completed.
Hello Uday
PL/SQL procedure successfully completed.
Hello Uday