Skip to content
Advertisement

Iterate through query

I’m trying to iterate through simple query

This is what I managed to create

But I get:

Advertisement

Answer

You don’t need a while loop for this. You can do this in a single query. One method is:

Trying to use a while look is troublesome. Such programming constructs would be in programming blocks. They are designed for stored procedures, functions, and triggers.

I assume that your code is actually over-simplified, because this probably does what you want:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement