title: checking if record exists in Sqlite + C#
body: <p>I'm trying to check if a record in a table already exists. </p>
  
  <p>How could I do that? </p>
  
  <p>I already wrote the following code:</p>
  
  <pre><code>string dbName = "Data Source=searchindex.db";
  SQLiteConnection con = new SQLiteConnection(dbName);
  con.Open();
  SQLiteCommand cmd = new SQLiteCommand(con);
  
  // If this sql request return false
  cmd.CommandText = "SELECT rowid FROM wordlist WHERE word='word'"; 
  cmd.ExecuteNonQuery();
  
  // then add record in table
  cmd.CommandText = "INSERT INTO wordlist(word) VALUES ('word')";
  </code></pre>