ALTER TABLE `cra_project` DROP COLUMN pid;
ALTER TABLE `cra_project` MODIFY COLUMN id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT;
MySQL 删除主键列,将另一列修改为主键自增
最新推荐文章于 2022-02-24 11:39:03 发布
ALTER TABLE `cra_project` DROP COLUMN pid;
ALTER TABLE `cra_project` MODIFY COLUMN id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT;