title: SQLite3 conditional insert?
body: <p>I have an sqlite3 database with multiple tables.</p>
  
  <pre><code>table1 (Row1, Row2)
  table2 (Row1, Row2)
  table3 (Row1, Row2)
  </code></pre>
  
  <p>I'd like to insert data from a specific column from table 2 if and only if that specific row data exists in table 2. Otherwise not perform the action.</p>
  
  <p>I considered the following:</p>
  
  <pre><code>INSERT OR IGNORE INTO
      table3
  VALUES
      ( x,
        ( SELECT SUM(Row2)
          FROM Table2
          WHERE Row1=y
        )
  </code></pre>
  
  <p>Thus it would stop on a conflict. But I need to insert or replace instead.</p>
  
  <p>Is there some way to insert the data only if there exists some condition from another table/row?</p>