While adding auto increment value to one of the columns in my mysql database table, I got the error saying:
Error
SQL query:
ALTER TABLE `tablename` ADD `id` VARCHAR(11) NOT NULL AUTO_INCREMENT AFTER `userid`, ADD PRIMARY KEY (`id`) ;
MySQL said:
#1063 - Incorrect column specifier for column 'id'
Solution
The error can easily be solved by changing the “type” of the column to INT (instead of VARCHAR which you’ve probably done).
Hopefully this solves your mysql error :) Happy coding!
#1063 – Incorrect column specifier for column ‘name’
it can be solved by removing the length e.g by default it shows 11 , so there is no need to assign length keep it bydefault.