[Solved] #1063 – Incorrect column specifier for column . . .

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' 

php-mysqlSolution

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!

hire best wordpress php css developer
Need Help? Hire me now!
I can help you in anything related to webdevelopment, including: HTML, CSS, PHP & MySql, WordPress (plugins & themes development, others), regular expressions, server management, etc.

One comment on “[Solved] #1063 – Incorrect column specifier for column . . .

Leave a Reply

Your email address will not be published.