hr@TEST>set serveroutput on
hr@TEST>declare tmpNum number:=10;
2 begin
3 dbms_output.put_line('tmpNum='||tmpNum);
4 execute immediate 'update test set fnum=(select sum(fnumsum) from tnum) '||
5 ' where fid=1 returning nvl(fnum,0) into :fnum' returning into tmpNum;
6 dbms_output.put_line('tmpNum='||tmpNum);
7 end;
8 /
tmpNum=10
tmpNum=3475.624