title: Can this union be done more elegantly?
body: <p>I'm trying to see if its possible to search whether a name "alias" exists on either table. If it exists in one or the other I should get one result. If it exists in both, I should get two results. This works, but I'm wondering if the same could be accomplished with a single query instead of a union. I also thought about declaring a variable so I won't have to type in 'test' twice, but I'm not sure what the best method for that is.</p>
  
  <pre><code>Select
  IDnumber, 
  ALIAS 
  from IdTABLE
  where ALIAS = 'test'
  union
  Select
  IDnumber, 
  ALIAS 
  from AliasTABLE
  where ALIAS = 'test'
  ;
  </code></pre>