我不断收到错误消息,提示 where 附近的语法不正确。有人可以告诉我我做错了什么吗?
string strSession = objGetSession.GetEmailFromSession();
con.Open();
string strInsertFnLn = "Insert into AUserAddress (FirstName, LastName) values (@FirstName, @LastName) where AUser_ID = (Select ID from AUser where Email ='" + strSession + "')";
using (SqlCommand Cmd = new SqlCommand(strInsertFnLn, con))
{
Cmd.Parameters.AddWithValue("@FirstName", txtEditFirstName.Text);
Cmd.Parameters.AddWithValue("@LastName", txtEditLastName.Text);
//Cmd.Parameters.AddWithValue("@Email", txtEditEmail.Text);
Cmd.ExecuteNonQuery();
con.Close();
}