user2132252
user2132252

Reputation: 49

Renumber field disable auto increment

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

Answers (1)

Kermit
Kermit

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

Related Questions