Mysql - Add auto_increment to primary key

前端 未结 1 1483
庸人自扰
庸人自扰 2020-12-08 16:33

I have a strange problem with mysql.

I am trying to alter a table\'s column which is a primary key and has an auto_increment constraint defined on it. This is also a

相关标签:
1条回答
  • 2020-12-08 16:53

    You don't need to specify PRIMARY KEY in the MODIFY statement:

    ALTER TABLE Parent MODIFY Identifier smallint(10) AUTO_INCREMENT;
    
    0 讨论(0)
提交回复
热议问题