MySQL 8.4 Release Notes
表 14.3 运算符Table 14.3 Operators
| 名称Name | 说明Description | 已弃用Deprecated |
|---|---|---|
&& |
按位与Bitwise AND | |
>> |
大于运算符Greater than operator | |
>>>> |
右移Right shift | |
>=>= |
大于或等于运算符Greater than or equal operator | |
<< |
小于运算符Less than operator | |
<>, !=<>, != |
不等于运算符Not equal operator | |
<<<< |
左移Left shift | |
<= |
小于或等于运算符Less than or equal operator | |
<=> |
NULL 安全等于运算符NULL-safe equal to operator | |
%, MOD |
取模运算符Modulo operator | |
* |
乘法运算符Multiplication operator | |
+ |
加法运算符Addition operator | |
- |
减法运算符Minus operator | |
- |
改变参数的符号Change the sign of the argument | |
-> |
在评估路径后从 JSON 列返回值;等同于 JSON_EXTRACT()。Return value from JSON column after evaluating path; equivalent to JSON_EXTRACT(). | |
->> |
在评估路径并去掉结果引号后从 JSON 列返回值;等同于 JSON_UNQUOTE(JSON_EXTRACT())。Return value from JSON column after evaluating path and unquoting the result; equivalent to JSON_UNQUOTE(JSON_EXTRACT()). | |
/ |
除法运算符Division operator | |
:= |
赋值一个值Assign a value | |
= |
分配一个值(作为 SET 语句的一部分,或作为 UPDATE 语句中 SET 子句的一部分)Assign a value (as part of a
SET
statement, or as part of the SET clause in an
UPDATE statement) |
|
= |
等于运算符Equal operator | |
^ |
按位异或Bitwise XOR | |
AND, && |
逻辑与Logical AND | |
BETWEEN ... AND ... |
一个值是否在某一数值范围内Whether a value is within a range of values | |
BINARYBINARY |
将字符串转换为二进制字符串Cast a string to a binary string | 是Yes |
CASE |
案例操作符Case operator | |
DIVDIV |
整数除法Integer division | |
EXISTS() |
查询结果是否包含任何行Whether the result of a query contains any rows | |
IN() |
一个值是否在一组值中Whether a value is within a set of values | |
IS |
将值与布尔值进行测试Test a value against a boolean | |
IS NOTIS NOT |
将值与布尔值进行测试Test a value against a boolean | |
IS NOT NULLIS NOT NULL |
非空值测试NOT NULL value test | |
IS NULLIS NULL |
NULL 值测试NULL value test | |
LIKE |
简单的模式匹配Simple pattern matching | |
MEMBER OF() |
如果第一个操作数与作为第二个操作数传递的 JSON 数组中的任何元素匹配,则返回 true (1),否则返回 false (0)Returns true (1) if first operand matches any element of JSON array passed as second operand, otherwise returns false (0) | |
NOT, ! |
否定值Negates value | |
NOT BETWEEN ... AND ...NOT BETWEEN ... AND ... |
某个值是否不在某个值的范围内Whether a value is not within a range of values | |
NOT EXISTS() |
查询结果是否不包含任何行Whether the result of a query contains no rows | |
NOT IN() |
某个值是否不在一组值中Whether a value is not within a set of values | |
NOT LIKE |
简单模式匹配的取反Negation of simple pattern matching | |
NOT REGEXPNOT REGEXP |
REGEXP 的否定Negation of REGEXP | |
OR, ||OR, || |
逻辑或Logical OR | |
REGEXPREGEXP |
字符串是否匹配正则表达式Whether string matches regular expression | |
RLIKE |
字符串是否匹配正则表达式Whether string matches regular expression | |
SOUNDS LIKESOUNDS LIKE |
比较声音Compare sounds | |
XORXOR |
逻辑异或Logical XOR | |
| |
按位或Bitwise OR | |
~ |
按位取反Bitwise inversion |