I have an stored procedure to delete from a long series of tables. It uses one main ID as parameter. I have to delete a bunch of rows based on a view that show that lot of tables. I want to apply the deleting procedure to every filtered result from that view. Some thing like:
SELECT id FROM view WHERE another_id=100;
And then apply the stored procedure to those results like:
CALL deleteProcedure(id);
DELETE
statements usingid
?CALL deleteProcedure(SELECT id FROM view WHERE another_id=100 )