title: SQL : BETWEEN vs <= and >=
body: <p>In SQL Server 2000 and 2005:</p>
  
  <ul>
  <li>what is the difference between these two <code>WHERE</code> clauses?</li>
  <li>which one I should use on which scenarios?</li>
  </ul>
  
  <p><strong>Query 1:</strong></p>
  
  <pre><code>SELECT EventId, EventName
  FROM EventMaster
  WHERE EventDate BETWEEN '10/15/2009' AND '10/18/2009'
  </code></pre>
  
  <p><strong>Query 2:</strong></p>
  
  <pre><code>SELECT EventId, EventName
  FROM EventMaster
  WHERE EventDate &gt;='10/15/2009'
    AND EventDate &lt;='10/18/2009'
  </code></pre>
  
  <p>(Edit: the second Eventdate was originally missing, so the query was syntactically wrong)</p>