In the Oracle PL/SQL, how to debug a complex stored proc ?
for example, the codes below, it is using loop + correlated subquery. how to fully understand it ? I have learned that the best way to debug is divide-and-conquer, then how to cut this coding into small pieces ?
Thanks
v_count := 1;
while v_count > 0
LOOP
update tbl_A a
set a.name = (select b.name from tbl_B b where a.id = b.id)
where a.id = (
select c.id from tbl_C c where c.id = a.id
)
v_count := sql%rowcount;
END LOOP