1 修改某一列为自动增长
mysql> alter table Statistic add Id int(11) primary key auto_increment;
Query OK, 0 rows affected (1.91 sec)Records: 0 Duplicates: 0 Warnings: 0

本文介绍如何在MySQL数据库中使用ALTER TABLE语句为指定表添加自动增长的整数列ID,并设置为主键和自动递增属性。
1 修改某一列为自动增长
mysql> alter table Statistic add Id int(11) primary key auto_increment;
Query OK, 0 rows affected (1.91 sec)Records: 0 Duplicates: 0 Warnings: 0

2562

被折叠的 条评论
为什么被折叠?