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
7242
October 04, 2017 03:04PM
841
October 04, 2017 07:07PM
1361
October 05, 2017 08:55AM
Re: Using LOOP and cursor
691
October 05, 2017 09:01AM
827
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.