12.4 Operators运算符

12.4.1 Operator Precedence运算符优先级
12.4.2 Comparison Functions and Operators函数和运算符的比较
12.4.3 Logical Operators逻辑运算符
12.4.4 Assignment Operators赋值运算符

Table 12.3 Operators运算符

Name名称Description描述Introduced引入版本
&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-safe equal to operator空安全等于运算符
%, MODModulo operator模运算符
*Multiplication operator乘法运算符
+Addition operator加法运算符
-Minus operator减法运算符
-Change the sign of the argument改变参数的符号
->Return value from JSON column after evaluating path; equivalent to JSON_EXTRACT().计算路径后从JSON列返回值;相当于JSON_EXTRACT()
->>Return value from JSON column after evaluating path and unquoting the result; equivalent to JSON_UNQUOTE(JSON_EXTRACT()).计算路径并取消引用结果后返回JSON列的值;相当于JSON_UNQUOTE(JSON_EXTRACT())
/Division operator除法运算符
:=Assign a value赋值
=Assign a value (as part of a SET statement, or as part of the SET clause in an UPDATE statement)赋值(作为SET语句的一部分,或作为UPDATE语句中SET子句的一部分)
=Equal operator相等运算符
^Bitwise XOR按位异或
AND, &&Logical AND逻辑与
BETWEEN ... AND ...Whether a value is within a range of values值是否在值的范围内
BINARYCast a string to a binary string将字符串转换为二进制字符串
CASECase operator情形运算符
DIVInteger division整除
IN()Whether a value is within a set of values值是否在一组值内
ISTest a value against a boolean根据布尔值测试值
IS NOTTest a value against a boolean根据布尔值测试值
IS NOT NULLNOT NULL value testNOT NULL值测试
IS NULLNULL value testNULL值测试
LIKESimple pattern matching简单模式匹配
MEMBER OF()Returns true (1) if first operand matches any element of JSON array passed as second operand, otherwise returns false (0)如果第一个操作数与作为第二个操作数传递的JSON数组的任何元素匹配,则返回true(1),否则返回false(0)8.0.17
NOT, !Negates value否定值
NOT BETWEEN ... AND ...Whether a value is not within a range of values值是否不在值的范围内
NOT IN()Whether a value is not within a set of values值是否不在一组值内
NOT LIKENegation of simple pattern matching简单模式匹配的否定
NOT REGEXPNegation of REGEXPREGEXP的否定
OR, ||Logical OR逻辑或
REGEXPWhether string matches regular expression字符串是否匹配正则表达式
RLIKEWhether string matches regular expression字符串是否匹配正则表达式
SOUNDS LIKECompare sounds比较声音
XORLogical XOR逻辑异或
|Bitwise OR按位或
~Bitwise inversion位反转

12.4.1 Operator Precedence
12.4.2 Comparison Functions and Operators
12.4.3 Logical Operators
12.4.4 Assignment Operators