Operator
Operator |
Description |
@ |
schema checker |
== |
equal |
!= |
not equal |
< |
less than |
> |
greater than |
<= |
less than or equal |
>= |
greater than or equal |
<> |
between |
<=> |
between or equal |
in |
belong to |
nin |
not belong to |
contains |
contain / full-text search |
=~ |
regular expression V4.1 |
The operands for conditional judgement must be consistent with the definitions of conditional operators to determine true or false:
Operator |
Description |
&& |
and |
|| |
or |
! |
not |
xor |
exclusive OR V4.1 |
Both operands and results of logical operation are either true or false.
Operator |
Description |
+ |
addition |
- |
subtraction |
* |
multiplication |
/ |
division |
% |
modulo (the remainder of division) |
Precedence
The following table shows the precedence of conditional operators, logic operators and numeric operators (1 represents the highest):
Precedence |
Operator |
Category |
1 |
( ), [ ] |
|
2 |
@ |
conditional operator |
3 |
! |
logic operator |
4 |
*, /, % |
numeric operator |
5 |
+, - |
numeric operator |
6 |
>, <, >= , <= , <> , <=>, in, nin, contains |
conditional operator |
7 |
== , != |
conditional operator |
8 |
&& |
logic operator |
9 |
xor, || |
logic operator |