我正在使用c#winform,当用户在State字段中输入内容时,我想在另一个表中查找该值并找到该代码。我已经评论了下面关于我尝试过的内容,但是没有用到
MySqlCommand cmdDatabase = new MySqlCommand(" update `STUDENT REGISTER` INNER JOIN `States` ON `STUDENT REGISTER`.`State` = `States`.`State Code` set " +
"`first Name`='" + cboStudentFirstName.Text.Trim() + "'," +
"`Surname`='" + cboStudentSurname.Text.Trim() + "'," +
//如果此人在此表上选择输入VIC,我希望它在名为states的表中查找该值,并将该状态的代码返回给我
“STUDENT REGISTER
。State
= States
。State Code
,”+