Mysql中自增

1、查看自己的表格设置及要自增的数据类型

命令 desc  表名;

 

然后输入命令 改变这一行的数据类型

alter table  student change stu_id stu_id int primary key auto_increment;

  然后添加行

posted @ 2021-09-10 21:12  donglong-  阅读(473)  评论(0)    收藏  举报