Hi,
i have a situation where i want to query the second cursor/loop only if there is no "record" returned (not found) in the first cursor/ loop
Scenario:
=========
consider a situation where there are 2 backup tables table2 and table3, so using master table1, i'll query table3 only if and only if no record is first found in table2 i.e. if i find at least one record in table2 then i dont need to go to table3
like
FIRST LOOP:
-------------------------
for t in (select * from table1, table2 where table1.id = table2.user_id) loop
.//something
end loop;
for above loop if no value is returned is when i execute second loop below,
NOTE: its checking if not found then get record(s) from loop second below,
SECOND LOOP:
-------------------------
for t in (select * from table1, table3 where table1.id = table3.user_id) loop
.//something
end loop;
what is the most efficient approach if iam using pl/sql?
thansk & regards,