我尝试将过期的行从一个表移动到另一个表:
MySqlConnection connect = new MySqlConnection(connectionStringMySql);
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connect;
cmd.Connection.Open();
string commandLine = @"INSERT INTO history SELECT clientid,userid,startdate,
enddate,first,city,imgurl,phone,type,seen
FROM events WHERE startdate<now();";
cmd.CommandText = commandLine;
cmd.ExecuteNonQuery();
cmd.Connection.Close();
该表完全相同(在每个表中,我都有带有主键的 id 列,具有自动增量),当我运行它时,我得到了这个异常:
Column count doesn't match value count at row 1
知道为什么会崩溃吗?