mysql 中怎么让id自动生成

发布网友

我来回答

1个回答

热心网友

create
table
student(
id
int(5)
not
null
auto_increatment,
name
varchar(20)
not
null,
age
int(3)
not
null,
primary
key(id));/*建表时加入这句话就可以,id是自增长的字段名称,或者在客户端要建的字段的属性上勾选自增长
primary
key*/

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com