MySQL Call Stored Procedure along with an UPDATE statement

MySQLstored-procedures

I am pretty much convinced that this is not possible but again I wanted to see if there is a possibility.

I have an UPDATE statement and I want to call a SP for each row updated. Is it possible someway to include the SP call along with the UPDATE statement?

Using a temporary table or another select query seems like a solution here though.

Best Answer

No, you can't do it directly.

Convert your stored procedure into a function and use the return and some user defined variables for the update.

you also can call the stored procedure in a function, and youse the return values.