12.1 Arithmetic Operators
+ - * / (DIV) % (MOD)
12.2 Comparison Operators
> < = <=> != <> >= <= between and exists in the specified range is null for empty in exists in the specified collection like Wildcard match REGEXP Regular expression matching
The so-called regular expression is the pattern to match a class of strings.
Pattern character |
Meaning |
^ |
Match the beginning of a string |
$ |
Match the end of a string |
. |
Match any one of the characters in the string |
[Character Set] |
Match any one of the characters in the character set |
[^ Character Set] |
Match any character in a character set |
Str1|str2|str3 |
Match any of the strings in str1, STR2, STR3 |
* |
Match character, containing 0 or any of |
+ |
Match characters, including at least 1 |
string {N} |
String appears consecutively n times |
string {m,n} |
The string appears continuously at least m times, up to N times |
12.3 Logical operators
and (&&) returns 1 if all operands are not 0 and is not NULL, any one of the operands is 0 o'clock, returns 0, any one operand is null and no operand is 0 o'clock, and Null is returned. OR(| | all operands have any one operand not 0, return 1, all operands are 0, return 0, All operands do not contain a number other than 0, but contain null, and the result returns null. not(!) single-action digit operator Returns 1 if the operand is not 0 digits, or 1 if the operand is 0, or null if the operand is null. XOR If one operand is 0 and the other operand is not 0, returns 1, the operand is 0 or the same as a non 0 number, returns 0, or null if the operand contains null.
12.4-bit operators
& Bitwise-and | Bitwise or ~ bitwise Inverse single-digit operator ^ bitwise xor << Bitwise left shift right 0>> bitwise Right SHIFT left 0
MySQL represents a constant with 8 bytes (64 bits).
MySQL Database learning 12 using the MySQL operator