1
I have a table for example
| ID | NOME |
| 2 | Ana |
| 7 | João |
| 15 | Vera |
The ID column is ID int NOT NULL AUTO_INCREMENT,
What I need to get?
I intend for the column to stay
| ID | NOME |
| 1 | Ana |
| 2 | João |
| 3 | Vera |
I tried many examples one of them would be to use a php to re-assign to each column field.
There is no way to do this with an SQL command ?
It’s relatively simple to do this using UPDATE with @variables and SET, but you’re probably trying to solve a XY problem. Don’t want to better specify your need for a more comprehensive solution?
– Bacco