title: sql range operator
body: <p>Is there a SQL construct or a trick to do something like:</p>
  
  <pre><code>SELECT i WHERE i BETWEEN 0 AND 10;
  </code></pre>
  
  <p>?</p>
  
  <p>My first idea is to create a temporary table such as:</p>
  
  <pre><code>CREATE TABLE _range ( i INT PRIMARY KEY );
  </code></pre>
  
  <p>and fill it</p>
  
  <pre><code>INSERT INTO _range VALUES 0;
  INSERT INTO _range VALUES 1;
  </code></pre>
  
  <p>etc. </p>
  
  <p>Is there a better way?</p>
  
  <p>UPDATE:</p>
  
  <p>I use sqlite in this particular case but i am interested in general answer.</p>