MySQL example of run for each record in cursor any SQL code (f.e. DROP TABLE)
MySQL example of run for each record in cursor any SQL code (f.e. DROP TABLE)

http://dev.mysql.com/doc/refman/5.6/en/cursors.html
Unfortunately MySQL does not allow direct anounimouse block execution - http://forums.mysql.com/read.php?20,574906, co procedure required

Hubbitus/sql