This is Rohit ,OCP from India.Please dont refer to the earlier pl/qsl given ,it will not solve ur problem.Use the below given program which will give u the desired result.
Inside a pl/sql u can find out the number of rows processed
by rowcount attribute of cursor.
select count(*) into old_rows from a;
insert into b
select * from a;
if new_rows=old_rows then
delete from a;
dbms_output.put_line('Error in inserting rows');
If any doubts please be free to write to me at