views:

55

answers:

1

Hi there,

ALTER TABLE `tada_prod`.`action_6_weekly`     ADD COLUMN `id` INT NULL AUTO_INCREMENT UNIQUE AFTER `member_id`;

works,

so i thought, to add the column as the first column i could do

ALTER TABLE `tada_prod`.`action_6_weekly`     ADD COLUMN `id` INT NULL AUTO_INCREMENT UNIQUE BEFORE `code`;

but i get a syntax error, what is the correct syntax?

+2  A: 
ALTER TABLE `tada_prod`.`action_6_weekly`
ADD COLUMN `id` INT NULL AUTO_INCREMENT UNIQUE FIRST;
Ben Hoffstein