gpt4 book ai didi

mysql - 在 SQL 中将 auto_increment 添加到主键

转载 作者:行者123 更新时间:2023-11-29 05:43:00 25 4
gpt4 key购买 nike

我有一个名为 A 的表,其中 B 列定义了 int not null Primary Key 并且已经有 4-5 个外键指向该列。使用什么语法的 Alter 使这个主键列成为 AUTO_INCREMENT ?

最佳答案

ALTER TABLE A AUTO_INCREMENT=1

关于mysql - 在 SQL 中将 auto_increment 添加到主键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5039456/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com