When I try to alter a table I got this error:
#1064
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIMARY KEY (id)' at line 1
Here is my query:
ALTER TABLE gk
ADD COLUMN id MEDIUMINT NOT NULL AUTO_INCREMENT, PRIMARY KEY (id);
How can I resolve this?