1
good afternoon!
I’m having my first contact with Mysql, before I worked with Oracle, and I came across a problem that on Oracle, I had the following structure:
for a in (select id, nome, salario from usuario)
loop
/*
Meu código aqui. Realizar um novo select, insert, update e etc.
*/
end loop;
With this structure I was able to work line by line of the return of select, but in Mysql I searched and I did not find anything similar, it seems that it does not even implement the command for. I wonder if anyone ever needed something like this and how it was that solved the problem, or even ideas to get around the problem would already make it much easier.
Thank you
See: https://dev.mysql.com/doc/refman/8.0/en/sql-compound-statements.html
– anonimo