title: sql join with extra conditions
body: <p>t1:</p>
  
  <pre><code>items, id, [...]
  a      12       
  b      21
  c      34
  d      45
  e      52
  </code></pre>
  
  <p>t2:</p>
  
  <pre><code>items order 
  a      1
  b      2
  others 3
  </code></pre>
  
  <p>Desired results:</p>
  
  <pre><code>items, id, [...], order
  a      12         1
  b      21         2
  c      34         3
  d      45         3
  e      52         3
  </code></pre>
  
  <p>I basically want everything that doesnt match 'a', 'b', to get the ordering of 'others'. But with inner join Im not sure how to do it, I can only join if there is a match, do I have to use subquery for something simply like this?</p>
  
  <pre><code>Select t1.items, t1.id, t2.order
  t1
  inner join 
  t2
  On t1.items = t.items
  </code></pre>