跳到主要内容

[ NOT ] BETWEEN

Returns true if the given numeric or string <expr> falls inside the defined lower and upper limits.

Syntax

<expr> [ NOT ] BETWEEN <lower_limit> AND <upper_limit>

Examples

SELECT 'true' WHERE 5 BETWEEN 0 AND 5;

┌────────┐
'true'
├────────┤
true
└────────┘

SELECT 'true' WHERE 'data' BETWEEN 'data' AND 'databendcloud';

┌────────┐
'true'
├────────┤
true
└────────┘
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册