title: Update table for all entries from select statement
body: <p>In my scenario, i select all the entries from a table where the condition is true, put it into a vector and use an update statement through a loop, passing the vector's values. It works.</p>
  
  <pre><code>SELECT * FROM MAP AS A WHERE EXISTS  
  (SELECT (X, Y) FROM MAP AS B WHERE B.X = A.X + 1 AND B.Y = A.Y ) AND EXISTS     
  (SELECT (X, Y) FROM MAP AS C WHERE C.X = A.X - 1 AND C.Y = A.Y ) ;
  
  for...
  UPDATE MAP SET VAL = 2 WHERE X = ? AND Y = ?; 
  ...
  </code></pre>
  
  <p>But i wanted to try and use a single statement to complete this objective, while we can update a table using a select statement, in my scenario there are 2 keys that need to checked before selecting a record, so i'm not able to put a where condition for x or y together.</p>
  
  <pre><code>UPDATE MAP SET USED = 1 WHERE EXISTS (
  SELECT * FROM MAP AS A WHERE EXISTS  
  (SELECT (X, Y) FROM MAP AS B WHERE B.X = A.X + 1 AND B.Y = A.Y ) AND EXISTS     
  (SELECT (X, Y) FROM MAP AS C WHERE C.X = A.X - 1 AND C.Y = A.Y ) );
  </code></pre>
  
  <p>When i put a where exists condition like above, it updates all the entries. How do i update the table in one query ?</p>