I have a table with 2 columns: sql_command and result like that:
sql_command result
select count(*) from t1; null
select count(*) from t2; null
select count(*) from t3; null
select count(*) from t4; null
Is it possible execute sql command and put the result into column without loop? With loop I can do it like this way:
declare c;
for .. loop
execute ..
into c;
update my_table
set result = c
where ...;
end loop;
But maybe there is a way without loop? With use execute in update or another way? Maybe it possible to create another table with dynamic execute, which will contain sql and result?
upd: I don't want to use loop, because I have 400+ tables and I believe, it is too much for loop.