title: SQL query multiple ranges without using multiple OR clauses (nesting LIKE, BETWEEN)
body: <p>I commonly have to query an extremely large table for multiple variables with many conditions per variable.  Often times, a variable will need to be queried for multiple ranges.  For example, I could need all records of VAR_1 where VAR_1 is between 200-300, 350-400, 450-500.</p>
  
  <p>Normally I would write this as follows, but have been told that using <code>IN()</code> instead of the multiple ORs would be much more efficient.
  </p>
  
  <pre><code>SELECT * FROM table
  WHERE VAR_1 BETWEEN '200' AND '300' OR
        VAR_1 BETWEEN '350' AND '400' OR
        VAR_1 BETWEEN '450' AND '500'
  </code></pre>
  
  <p>Is there any way to condense this information and get rid of the <code>OR</code>s by nesting <code>LIKE</code> or <code>BETWEEN</code> clauses within an <code>IN()</code>? 
  Something along the lines of:
  </p>
  
  <p><code>WHERE VAR_1 IN (BETWEEN '200' AND '300', BETWEEN '350' AND '400', BETWEEN '450' AND '500')</code></p>
  
  <p>or</p>
  
  <p><code>WHERE VAR_1 IN ('[200-300]','[350-400]','[450-500]')</code></p>
  
  <p>I have tried things like these, but the syntax is clearly incorrect. Any ideas or directions you can point me in would be great, still very new to SQL.</p>