title: if exists update else insert
body: <p>I want to know if the next piece of code is correct:</p>
  
  <pre><code> SqlCommand cmd = new SqlCommand(
     "IF NOT EXISTS(SELECT count(*) from Raspunsuri where id_intrebare=2)" +
     "Insert INTO Raspunsuri VALUES(@raspuns,@cnp,@data,2,@ip,@idsesiune)" +
     "else" +
     "UPDATE Raspunsuri SET raspuns=@raspuns,cod_numeric_personal=@cnp,data_raspuns=@data,id_intrebare=2,ip_user=@ip,id_sesiune=@idsesiune WHERE id_intrebare=2", con);
  </code></pre>
  
  <p>All the parameters are correct that I want to insert but it seems this piece of code doesn't do the insert or update.Do you have any suggestions?it's a sql query combined with c#..</p>