title: SQL SELECT what in range number
body: <p>I need help to solve my issue.</p>
  
  <p>I have a table like this one,</p>
  
  <pre><code>id | Desc | Min Range | Max Range
  -----------------------------------
  1  |  A   |     0     |    10
  2  |  B   |     11    |    20
  3  |  C   |     21    |    30
  </code></pre>
  
  <p>How to get the second record when I put parameter 20.</p>
  
  <p>My solution now is like this:</p>
  
  <pre><code>select * from table where maxRange &lt;= 20
  </code></pre>
  
  <p>and in java, I get last of result list.</p>
  
  <p>My problem is I don't have parameter to compare when I use between. eg. </p>
  
  <pre><code>select * from table where maxRange between ? and ?
  </code></pre>