title: How to check if a given data exists in multiple tables (all of which has the same column)?
body: <p>I have 3 tables, each consisting of a column called username. On the registration part, I need to check that the requested username is new and unique.</p>
  
  <p>I need that single SQL that will tell me if that user exists in any of these tables, before I proceed. I tried:</p>
  
  <pre><code>SELECT tbl1.username, tbl2.username, tbl3.username
  FROM tbl1,tbl2,tbl3
  WHERE tbl1.username = {$username}
     OR tbl2.username = {$username}
     OR tbl3.username ={$username}
  </code></pre>
  
  <p>Is that the way to go?</p>