oracle 中我们在使用between and 的时候,时常会提出between and 到底包不包含临界值呢?
围绕这个问题做个验证如下:
从日历表中查询2023-01-01日到2023-01-10日之间的日期
我们使用between and 后发现,是包含2023-01-01 和 2023-01-10 两天的数据
结论:
1、between 的范围:包含两边的边界值
等同于 d_day >= ‘2023-01-01’ and d_day <= ‘2023-01-10’
2、not between 范围:不包含两边的边界值