Hello,
I need to construct a query that sets column current
to 1 in a randomly selected row from a table. Is there a way to do this with a single query? Or are two queries required (i.e. SELECT id, current FROM table ORDER BY RAND() LIMIT 1 and then use the respective randomly selected ID in the following UPDATE statement)?
Thanks in advanced.