I have to alter my table adding a column that I have to fill with sequence of int numbers. Does anyone knows how can I fill this column? I tried this:
set @i = 1;
Update db.table set new_column=(@i := @i+1) where id>0;
But this just fill all lines with the number 2. =(