Hello Experts;
I have the following sample code below..
SET SERVEROUTPUT ON
declare
v_cnt number;
cursor v_cur
is
select table_name,
owner
from all_tables
where rownum = 2
and owner = 'test';
begin
for v_rec in v_cur loop
execute immediate 'select * from ' ||
v_rec.owner || '.' || v_rec.table_name ||
' where 1=1';
end loop;
end;
I was wondering if this can be converted to SQL using the with clause as well. I tried getting some ideas by looking at the some of the old thread but I wasn't too successes. This is an old thread I tried using as a reference
PL/SQL Query help. (0 Bytes)
Thanks in advance