con.Open(); string query = "INSERT INTO userinfo(username, Name, Phone, Email, Address, Postalcode) values (@username, @Name, @phone, @email, @Address, @postalcode) WHERE username =" + username;
Error report:
incorrect syntax near WHERE
Advertisement
Answer
SQL INSERT statements do not support a WHERE clause. I assume you are looking for the UPDATE statement instead.