Update values incrementally in mysql April 30, 2023 by Tarik Try this: mysql> select @i := 0; mysql> update bar set c = (select @i := @i + 1);