MySQL Forums
Forum List  »  Stored Procedures

Re: Passing value beteen declared variables within cursor loop
Posted by: Rick James
Date: March 15, 2016 08:22PM

Yeah, something like this:

UPDATE csf_core
SET subcat_id = COALESCE(subcategory, subcat_id);

What you have updates _all_ row every time!

Options: ReplyQuote

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.