MySQL Forums
Forum List  »  Stored Procedures

Dynamic Cursor
Posted by: Mariano Su
Date: April 08, 2019 08:03PM

I need to make a cursor that can be changed depending on the parameters of the procedure....

for example: I have a procedure "CREATE PROCEDURE updateTable(IN variable INT)"

I need the statement for the cursor to include that variable....

declare table_cursor cursor for select field1,field2 from tb_table where field3=variable;

is that possible?

thanks very much

Options: ReplyQuote

Written By
Dynamic Cursor
April 08, 2019 08:03PM
April 08, 2019 08:55PM
July 02, 2019 01:27PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.