Add auto increment to existing column without affecting current record values

后端 未结 1 1147
自闭症患者
自闭症患者 2021-01-15 12:29

I would like to change the column type to AUTO_INCREMENT within an existing MyISAM1 database table. The databse currently has thousands of records

相关标签:
1条回答
  • 2021-01-15 13:33

    You are using wrong syntax, try below command-

    ALTER TABLE `myTable` CHANGE `myCol1` `myCol1` INT(11) NOT NULL AUTO_INCREMENT, auto_increment=2500;
    
    0 讨论(0)
提交回复
热议问题