How add unique key to existing mysql table (with non uniques rows) April 28, 2015ITcceye Liu ALTER TABLE `database_name`.`table_name` ADD COLUMN `id` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`id`);