I would like to modify a value by using a dynamic sql statement. The example is choosen to be reproductible. I know that I don't need a dynamic sql statement for that.
variable a number =1;
print a
1
exec execute immediate 'select 2 into :a from dual'
PL/SQL procedure successfully completed.
print a
1
1 is returned instead of 2, which means that my statement wasn't executed.
So, how can it be executed?