MySQL – How to Write Loop in MySQL
- by Pinal Dave
Since, I have written courses on MySQL, I quite often get emails about MySQL courses. Here is the question, which I have received quite often.
“How do I loop queries in MySQL?”
Well, currently MySQL does not allow to write loops with the help of ad-hoc SQL. You have to write stored procedure (routine) for the same.
Here is the example, how we can…