MySQL:什么是上限时间限制'2017-05-31 23:59:59'或'2017-05-31 24:00:00'?

时间:2017-05-22 03:34:22

标签: mysql

设置持续时间上限时应该使用什么

a)date_start between '2017-05-01 00:00:00' and '2017-05-31 23:59:59'

b)date_start between '2017-05-01 00:00:00' and '2017-05-31 24:00:00'

是a还是b?

由于

1 个答案:

答案 0 :(得分:0)

它将是a

date_start between '2017-05-01' and '2017-05-31 23:59:59'

,因为

2017-05-31 24:00:00
means
2017-06-01 00:00:00