SQL Operators(运算符)
概述
参考:
运算符 | 描述 | 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 | ||||
%,MOD | Modulo 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(). | ||||
-» | Return value from JSON column after evaluating path and unquoting the result; equivalent to JSON_UNQUOTE(JSON_EXTRACT()). | ||||
/ | Division operator | ||||
:= | 变量赋值 | ||||
= | 变量赋值(作为 SET 语句的一部分,或作为 UPDATE 语句中 SET 子句的一部分) | ||||
= | Equal operator | ||||
^ | Bitwise XOR | ||||
AND,&& | Logical AND | ||||
BETWEEN … AND … | Whether a value is within a range of values | ||||
BINARY | Cast a string to a binary string | 8.0.27 | |||
CASE | Case operator | ||||
DIV | Integer division | ||||
IN() | Whether a value is within a set of values | ||||
IS | Test a value against a boolean | ||||
IS NOT | Test a value against a boolean | ||||
IS NOT NULL | NOT NULL value test | ||||
IS NULL | NULL value test | ||||
LIKE | Simple pattern matching | ||||
MEMBER OF() | Returns true (1) if first operand matches any element of JSON array passed as second operand, otherwise returns 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 LIKE | Negation of simple pattern matching | ||||
NOT REGEXP | Negation of REGEXP | ||||
[OR, | ](https://dev.mysql.com/doc/refman/8.0/en/logical-operators.html#operator_or) | Logical OR | |||
REGEXP | Whether string matches regular expression | ||||
RLIKE | Whether string matches regular expression | ||||
SOUNDS LIKE | Compare sounds | ||||
XOR | Logical XOR | ||||
[ | ](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_bitwise-or) | Bitwise OR | |||
~ | Bitwise inversion |
反馈
此页是否对你有帮助?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.