Hi

At times we need to run a SQL query within a WHILE or FOR loop to get data based on the value during the loop.

I wonder if its a good practice at all?