Reply
Highlighted
Member
Posts: 1
Registered: ‎12-13-2019

Returning multiple values from stored procedure

I have to write for my homework. We are currently working on the sakila database to get familiar with MySQL functions and procedures. Now I have to write a stored procedure that updates the last_update row of the film table to the current timestamp and returns a resultset containing both the old and new values of film.last_update. I managed to get it somewhat done by returning two distinct select statements from the procedure, but how can I get the select from before the update and after the update in a single resultset to display? Thanks for your help

 
Highlighted
Member
Posts: 1
Registered: ‎12-16-2019

Re: Returning multiple values from stored procedure

[ Edited ]

Return values can be used within stored procedures to provide the stored procedure execution status to the calling program. You can create your own parameters that can be passed back to the calling program. By default, the successful execution of a stored procedure will return 0.