MySQL Forums
Forum List  »  Stored Procedures

Re: Using LOOP and cursor
Posted by: penn rabb
Date: October 05, 2017 09:01AM

Actually I messed up the good query, should be


UPDATE table1 SET id_table2 = (SELECT id FROM table2 WHERE (SELECT number FROM table1 WHERE id = 1) BETWEEN table2.number_column1 AND table2.number_column2);

Options: ReplyQuote


Subject
Views
Written By
Posted
6992
October 04, 2017 03:04PM
787
October 04, 2017 07:07PM
1284
October 05, 2017 08:55AM
Re: Using LOOP and cursor
645
October 05, 2017 09:01AM
788
October 05, 2017 12:19PM


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.