Mysql
 sql >> Database >  >> RDS >> Mysql

query mysql per aggiornare il campo a max(field) + 1

Prova

UPDATE TABLE set field = ((SELECT selected_value FROM (SELECT MAX(field) AS selected_value FROM table) AS sub_selected_value) + 1) WHERE id in (1,3,5,6,8)