title: sqlite INSERT INTO ... WHERE NOT EXISTS and get the id?
body: <p>is it possible to get the id even if I use  INSERT INTO ... WHERE NOT EXISTS?
  how to modify it so it will bring me the id of the inserted record or the id of the already existed record? if possible at all!</p>
  
  <pre><code>INSERT INTO Timeline (name, ts)
  SELECT @name, @ts
  WHERE NOT EXISTS (SELECT 1 FROM Timeline WHERE name=@name AND ts = @ts);
  </code></pre>
  
  <p>i have a column called "<strong>id</strong>" with auto increment integer
  how I can get the value of the ID? </p>
  
  <p>cheers</p>