The only way I know how to do this is via insertion into a table with an auto increment column. I don't know how to do this with your existing table, but you can create a new one, and then copy the previous table over to it, populating the auto increment column in the process:
CREATE TABLE newTable (col1, col2, ..., colAuto INT NOT NULL AUTO_INCREMENT);
INSERT INTO newTable (col1, col2, ..., colAuto)
SELECT col1, col2, ..., NULL -- NULL for colAuto
FROM yourTable
ORDER BY ad_id;
This should result in a new table with the same data, and a column colAuto
which starts as 1, as ordered by the ad_id
column in your original table. After this, you may alter colAuto
if you don't want it to be auto increment anymore. You may also delete the original table if it no longer serves any purpose.
Edit:
We might also be able to do this using a row number session variable:
SET @rn := 0;
UPDATE yourTable
SET colAuto = (SELECT @rn := @rn + 1 )
ORDER BY ad_id;
But in practice, doing such an update into a non auto increment column may not make much business sense. This is because as soon as you add more data to your table, you would have to manually update again, but this time the sequence would be starting from some number other than zero. Really, an auto increment column is the way to go for easily maintaining a sequence in SQL.