Hi

Here is an example where SQL%ROWCOUNT can be used

SQL> declare
2 a number(4);
3 begin
4 delete from emp;
5 a := sql%rowcount;
6 dbms_output.put_line(a);
7* end;
SQL> /
14

PL/SQL procedure successfully completed.

this pl/sql block is returning 14 rows

When no_data_found is an exception which will be raised when there in no matching record available in the tables


PS : This is Just an example for understaning you can also implement depending on your requirement

Regards