Updating a random row in a table

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. :slight_smile:

UPDATE daTable
   SET current = current + 1
ORDER
    BY RAND() LIMIT 1

Thank you very much. Works like a charm. Appreciate it. :slight_smile: