I have the following for loop
for i in (
select * from employees)
loop
--code
end loop;
Is it possible to assign the select statement in a variable like
sql_stat := 'select * from employees';
and in loop
for i in (
sql_stat)
loop
When I tried the above I am getting error "Encountered the symbol loop"
What is the correct way of doing this if I want to assign the select statement in a variable.
Thanks