MySQL:BETWEEN AND操作符的边界

编程入门 行业动态 更新时间:2024-10-28 18:25:28

MySQL:BETWEEN AND操作符的<a href=https://www.elefans.com/category/jswz/34/1761295.html style=边界"/>

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操作符的边界

本文发布于:2023-12-06 23:48:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1669399.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:边界   操作   MySQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!