title: Between two different range numbers
body: <p>I have a stored procedure that has a table for a parameter with two columns: From and To. Both int. It is used for searching scores.
  The example of the table is </p>
  
  <pre><code>+-----------+-------+----+
  | RowNumber | From  | To |
  +-----------+-------+----+
  |         1 |     0 | 30 |
  |         2 |    60 | 80 |
  +-----------+-------+----+
  </code></pre>
  
  <p>How can I search a table to have results that include all scores between 0 and 30 and 60 and 80?</p>
  
  <p>I had tried <code>between</code> inside a while loop but nothing.</p>