Does anyone know the range comparison of the BETWEEN clause? if I have a datetime datatype, does the BETWEEN clause compare until hour/minute/second level?
yes it does, if its the same (down to the millasecond) then it is valid and will assert to true. So will be shown
This:
WHERE datetime_column BETWEEN '2010-08-11' AND '2010-08-12'
is equivalent to
WHERE (datetime_column >= '2010-08-11 00:00:00.000' AND datetime_column <= '2010-08-12 00:00:00.000')
There are two things to note here:
'2010-08-11' doesn't mean you're checking on an entire day.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With