首页 > 代码库 > jdbc mysql - Column count doesn't match value count at row 1.

jdbc mysql - Column count doesn't match value count at row 1.

该句的意思是,insert操作的SQL语句里列的数目和后面值的数目不一致.比如说,

String sql = "insert into t_aqi(city_name, cur_date, aqi_val, no2_val, no2_val) values(?, ?, ?, ?)";

这里很明显,t_aqi括号中的参数的个数多余values括号中的个数.

jdbc mysql - Column count doesn't match value count at row 1.