mysql – Add Auto-Increment ID to existing table? – Stack Overflow

I have a pre-existing table, containing ‘fname’, ‘lname’, ’email’, ‘password’ and ‘ip’. But now I want an auto-increment column. However, when I enter:ALTER TABLE usersADD id int NOT NULL AUTO_INCREMENT

Source: mysql – Add Auto-Increment ID to existing table? – Stack Overflow

mysql – Add Auto-Increment ID to existing table? – Stack Overflow was last modified: July 13th, 2017 by Jovan Stosic