1. 数字范围条件:
SELECT * FROM your_table WHERE column1 BETWEEN 50 AND 100;
2. 日期范围条件:
SELECT * FROM your_table WHERE date_column BETWEEN '2023-01-01' AND '2023-12-31';
3. 字符串范围条件:
SELECT * FROM your_table WHERE string_column BETWEEN 'A' AND 'D';
4. 与其他条件结合使用:
SELECT * FROM your_table WHERE column1 BETWEEN 50 AND 100 AND column2 = 'value';
BETWEEN条件提供了一种简便的方式来筛选某个范围内的数据,无论是数字、日期还是字符串。
转载请注明出处:http://www.pingtaimeng.com/article/detail/11734/OceanBase