I know that every successful sql statement comes with a return code and other possible metadata like the number of rows affected. I know that
*no* sql statement "comes with a result msg like 10 rows updated"
That message is simply sqlplus, toad or sqldeveloper running your statement and then deciding "i will print on the screen the output of this for you". It is not part of the database - it is part of their user interface.
You would have to program your own UI to "capture" these (but you wouldn't be capturing them, you'd be *generating* them).
for example:
ops$tkyte%ORA11GR2> begin
2 update emp set ename = lower(ename);
3 dbms_output.put_line( sql%rowcount || ' rows updated!' );
4 end;
5 /
14 rows updated!
PL/SQL procedure successfully completed.
14 rows updated - we did that.
pl/sql procedure successfully completed - that is what sqlplus decided would be a nice thing to print on your screen after running your plsql block....
If you need to review this information, you'd have to spool out the output of what sqlplus wrote to you and retrieve it from the spooled file.