I have MYSQL data like this
id | number
1 | 3
4 | 4
7 | 7
10 | 5
11 | 6
I have the database like that, and how to update the number so it will be sorted incremental?
Which mean the result will be like this
id | number
1 | 1
4 | 2
7 | 3
10 | 4
11 | 5
i updated the question so there will be no confusion in id and since id will be not consecutive
This would work even if table is:
to be like this: