title: Check if a specific row exists, and if it doesn't, add a new one
body: <p>I'm beginner in SQL and C#. My question is: how do I check whether a row in the table exists or not? Here is my code that I am currently using:</p>
  
  <pre><code>var conn = new SqlConnection(@"Data Source");
  conn.Open();            
  var cmd = new SqlCommand("INSERT INTO  Results (PlayerName) VALUES (@PlayerName)  " , conn);
  cmd.Parameters.Add("@PlayerName",_playerName);
  cmd.ExecuteNonQuery();
  conn.Close();
  </code></pre>
  
  <p>I want to check if the player name exists or not, and if not, then add it to the table. </p>