比较函数,运算
包括大于,小于,等于,大于等于,小于等于,不等于。
Operator |
Description |
< |
less than |
> |
greater than |
<= |
less than or equal to |
>= |
greater than or equal to |
= |
equal |
<> or != |
not equal |
比较谓词,
Predicate |
Description |
a BETWEEN x AND y |
a在x和y之间 |
a NOT BETWEEN x AND y |
a不在x和y之间 |
a BETWEEN SYMMETRIC x AND y |
输出排序之后的比较区间值 |
a NOT BETWEEN SYMMETRIC x AND y |
不在x和y之间的排序值 |
a IS DISTINCT FROM b |
a 等于 b,例:select * from test where col1 is DISTINCT from col2; |
a IS NOT DISTINCT FROM b |
a 等于 b |
expression IS NULL |
值为空 |
expression IS NOT NULL |
值不为空 |
expression ISNULL |
为空 |
expression NOTNULL |
值不为空 |
boolean_expression IS TRUE |
为真 |
boolean_expression IS NOT TRUE |
不为真,false or unknown |
boolean_expression IS FALSE |
为假 |
boolean_expression IS NOT FALSE |
不为假, true or unknown |
boolean_expression IS UNKNOWN |
unknown |
boolean_expression IS NOT UNKNOWN |
不是unknown, true or false |
比较函数。计算输入参数中的非空数量或空值数量。
Function |
Description |
Example |
Example Result |
num_nonnulls(VARIADIC "any") |
计算输入参数中的非空数量 |
num_nonnulls(1, NULL, 2) |
2 |
num_nulls(VARIADIC "any") |
计算输入参数中的空数量 |
num_nulls(1, NULL, 2) |
1 |