标签:inf mys val 技术 bsp 问题 col uid err
版本:8.0.16
创建了一张表:create table user_table(
uid int primary key auto_increment,
uname varchar(10)
)auto_increment=1
插入数据报错:
经查找 ,有三种方式可以解决这个问题:
1.插入数据得时候,带入列名:
insert into user_table("uname") values ("刘一")
2.自增键这列设置为0
insert into user_table values(0,"刘二")
3.自增键这列设置为null
insert into user_table values(null,"刘三")
结果:
mysql插入数据 报错[Err] 1136 - Column count doesn't match value count at row 1(表中有自增列)
标签:inf mys val 技术 bsp 问题 col uid err
原文地址:https://www.cnblogs.com/yanwangye/p/12093949.html