I have an existing database, with a table Categories
, where I have a primary key on a column id
. I have a lot of rows in my database, so I don't want to make it from the beginning.
I forgot when I was creating it to do AUTO_INCREMENT in Categories
, so now I try to update it, but I get an error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'MODIFY'.
This is my code
ALTER TABLE Categories MODIFY id INT AUTO_INCREMENT;
Does anyone know what I do wrong?