title: Sql check range exist between a range
body: <p>i have a table like </p>
  
  <pre><code>----------------------------------
  |  ID  |  MinValue  |  MaxValue  |
  ----------------------------------
  |  1   |      0     |    10      |
  |  2   |     11     |    20      |
  |  3   |     21     |    30      |
  </code></pre>
  
  <p>and i have a range value for example </p>
  
  <pre><code>minV = 5 
  maxV = 15
  </code></pre>
  
  <p>i want to get row who's value matchs the range from database table </p>
  
  <p><strong>Example</strong>
   minV = 5 ,
      maxV = 15 should return first and second record</p>
  
  <p><strong>Example</strong>
   minV = 5 ,
      maxV = 35 should return all record</p>
  
  <p><strong>Example</strong>
   minV = 5 ,
      maxV = 9 should return first record</p>