MySQL Forums
Forum List  »  Stored Procedures

Re: While loop with Dynamic SQL
Posted by: Rick James
Date: November 16, 2014 12:32PM

Select @Table_names = table_names from Test_Table_Counts where id = @min;
-->
Select @Table_names := table_names from Test_Table_Counts where id = @min;

That is, when assigning to an @variable in a SELECT, you just use ':='. Plain '=' is the comparison operator in that context.

Options: ReplyQuote


Subject
Views
Written By
Posted
15500
November 14, 2014 07:21PM
2193
November 14, 2014 07:27PM
Re: While loop with Dynamic SQL
1843
November 16, 2014 12:32PM
2023
November 16, 2014 01:28PM
1525
November 16, 2014 02:55PM
1512
November 16, 2014 03:06PM
1556
November 16, 2014 05:27PM
1637
November 17, 2014 11:19PM
1714
November 16, 2014 04:44PM


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.