The syntax for the REPEAT statement in MySQL is:
Parameters or Arguments
Optional. It is a name associated with the REPEAT loop.
The statements of code to execute each pass through the REPEAT loop.
The condition that will terminate the REPEAT loop.
Let's look at an example that shows how to use the REPEAT statement in MySQL:
In this MySQL LOOP example, the REPEAT statement would repeat the loop until income is greater than or equal to 4000, at which point the REPEAT loop would be terminated.