title: How to update a MYSQL column if the value's exist in another table?
body: <p>I have a two tables in my database, tableA and tableB. </p>
  
  <pre><code>tableA:
  
  id | col1  | col2  | in_b
  -----------------------
  1  | "abc" | "efg" | false
  2  | "foo" | "bar" | false
  </code></pre>
  
  <p><br/></p>
  
  <pre><code>tableB: 
  
  id | col1  | col2  
  ------------------
  1  | "abc" | "bar" 
  </code></pre>
  
  <p>I want to update the in_b column so that it is true if either col1 or col2's values matches a row in tableB. For example, both <code>in_b</code> flags would be true, because "abc" is in col1 of tableB and "bar" is in col2 of tableB. col1 and col2 are not unique. </p>
  
  <p>What is the best way to update the in_b flag? </p>