How to get auto increment work on NAVICAT

rahul picture rahul · Jun 10, 2012 · Viewed 22.9k times · Source

I am using NAVICAT to make tables for MYSQL and I am unable to find the auto-increment attribute option for my primary key column.

id integer(10)(auto_increment)primary key

Anyone pls help me out!

Answer

GDP picture GDP · Jun 10, 2012

I'm not familiar with NAVICAT but if you can run SQL statements directly, try this:

ALTER TABLE `yourTable` CHANGE `id` `id` INT(10) NOT NULL AUTO_INCREMENT

Full docs here.