问题出现在于:
新插入一行数据时候,返回错误。
键入:

mysql> insert into students values(1,"goutou",18,"男",12121);

返回:

ERROR 1136 (21S01): Column count doesn't match value count at row 1

然后检查创建的表格:
在这里插入图片描述
检查语句没有问题,想到之前进行过删除一个列的操作,又新添加了两列,改输入为:

mysql> insert into students(id,name,age,gender,clc_id) values(0,"zhutou",12,"男",12121);
Query OK, 1 row affected (0.06 sec)

显示表格:
在这里插入图片描述

本质就是部分插入问题

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐