I know the following sample code does not work because Oracle will not let me use the cursor values as part of the statemet. But is there a way I can do something similar to that? I use the cursor to return tables that meet a certain criterias, then use the loop to get a count of the records in each table. Thanks,
ex.
cursor get_table is
select table_name
from user_tables
where table_name like 'xyz%';
begin
...
for ex in get_table is
select count(*)
from ex.table_name;
end loop;
end;
ex.
cursor get_table is
select table_name
from user_tables
where table_name like 'xyz%';
begin
...
for ex in get_table is
select count(*)
from ex.table_name;
end loop;
end;