title: pick value from one table with the value in between another table's two variable
body: <p>I have 2 tables, t1 and t2</p>
  
  <pre><code>t1
  ID  P     CODE
  3   11     19
  5   5      118
  8   Null   212
  6   8      992
  
  t2
  ID  c1  C2
  3   1   99  
  3   100 199
  3   200 299
  5   500 999
  </code></pre>
  
  <p>How do I select all columns of t2 and addition column with value P, where t1.code between c1 and c2
  Like </p>
  
  <pre><code>ID  c1  C2   p
  3   1   99   11
  3   100 199  5
  3   200 299  Null
  5   500 999  8
  </code></pre>
  
  <p>Thanks</p>