边界"/>
MySQL:BETWEEN AND操作符的边界
文档原文:
expr BETWEEN min AND max
If expr is greater than or equal to min and expr is less than or equal to max, BETWEEN returns 1, otherwise it returns 0. This is equivalent to the expression (min <= expr AND expr <= max) if all the arguments are of the same type. Otherwise type conversion takes place according to the rules described in Section 12.3, “Type Conversion in Expression Evaluation”, but applied to all the three arguments.
来自:.0/en/comparison-operators.html#operator_between
就是说
expr BETWEEN min AND max-- 等价于(推荐写法)
min <= expr AND expr <= max-- 包含边界
[min, max]
更多推荐
MySQL:BETWEEN AND操作符的边界
发布评论