Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

consulta mysql para atualizar o campo para max(field) + 1


Experimentar
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)