This is what I tried but it fails:
alter table goods add column `id` int(10) unsigned primary AUTO_INCREMENT;
Does anyone have a tip?
Not sure if this matter to anyone else, but I prefer the id table to the first column in the database. The syntax for that is:
ALTER TABLE your_db.your_table ADD COLUMN `id` int(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT FIRST;
Which is just a slight improvement over the first answer. If you wanted it to be in a different position, then
ALTER TABLE unique_address ADD COLUMN `id` int(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT AFTER some_other_column;
HTH, -ft