Reputation: 49
Is it possible to disable auto increment so that I can renumber a field with out the AI?
I'm trying this, but it doesn't seem to be working properly:
ALTER TABLE `x`.`billadr`
CHANGE COLUMN `AutoInc` `AutoInc`
INT(11) NOT NULL ;
Upvotes: 1
Views: 3309
Reputation: 34055
Is this what you're looking for?
ALTER TABLE `x`.`billadr` AUTO_INCREMENT = 1234;
If you want to remove AUTO_INCREMENT
then just redefine the column without it:
ALTER TABLE `x`.`billadr` CHANGE `AutoInc` `AutoInc` INT(11) NOT NULL
Otherwise, create a new column, copy/renumber as needed.
Upvotes: 4