已解决
MySQL:BETWEEN AND操作符的边界
来自网友在路上 198898提问 提问时间:2023-10-21 04:12:25阅读次数: 98
最佳答案 问答题库988位专家为你答疑解惑
文档原文:
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.
来自:https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_between
就是说
expr BETWEEN min AND max-- 等价于(推荐写法)
min <= expr AND expr <= max-- 包含边界
[min, max]
查看全文
99%的人还看了
相似问题
猜你感兴趣
版权申明
本文"MySQL:BETWEEN AND操作符的边界":http://eshow365.cn/6-20591-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!