O'Reilly logo
  • Dustin Waybright thinks this is interesting:

If you’re wondering why this code expresses the date range by using greater than or equal to (>=) and less than (<) operators as opposed to using BETWEEN, there’s a reason for this. When you are using BETWEEN and the column holds both date and time elements, what do you use as the end value?


Cover of Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012


Should always use >= AND < instead of between to ensure the data is being handled as expected around the ending value.