How to use PREPARE and EXECUTE in Stored Procedure backup script (MySQL)
I have a Stored Procedure which loops through all the tables in a schema (customerinfo) and makes a backup of them by renaming them to include the date and copying them to another schema (customerinfo_bak).