title: sqlite update (without join)
body: <p>Pretty new to sqlite (and sql).  Trying to modify one table using another.</p>
  
  <pre><code>create table Person(Key1 INTEGER, Key2 INTEGER, Name, IsDead, PRIMARY KEY (Key1,Key2));
  create table Zombie(Key1 INTEGER, Key2 INTEGER, PRIMARY KEY (Key1,Key2));
  </code></pre>
  
  <p>I'd like to update IsDead column based on a list provided in Zombie.
  SQLite apparently can't use join with an update.  Considering UPDATE or REPLACE statements.
  Thank you in advance.</p>
  
  <p>As per @Tyler Ferraro, below is the solution.</p>
  
  <pre><code>UPDATE Person
  SET IsDead = 1
  WHERE EXISTS
  (
  SELECT *
  FROM Zombie
  WHERE Person.Key1 = Zombie.Key1 and Person.Key2 = Zombie.Key2
  );
  </code></pre>
  
  <p>Below works for a single key, but I don't know how to handle composite keys.</p>
  
  <pre><code>UPDATE Person
  SET IsDead = 1
  WHERE Key1
  IN
  (
  SELECT Key1
  FROM Zombie
  );
  </code></pre>