MySQL Tutorial
Operators in MySQL are used to perform operations on data. They are essential in queries for performing calculations, comparisons, logical operations, and more.
|
Operator |
Description |
Example |
|---|---|---|
|
+ |
Addition |
|
|
- |
Subtraction |
|
|
* |
Multiplication |
|
|
/ |
Division |
|
|
% |
Modulus (Remainder) |
|
Operator |
Description |
|---|---|
|
& |
Bitwise AND |
|
| |
Bitwise OR |
|
^ |
Bitwise XOR |
|
Operator |
Description |
Example |
|---|---|---|
|
= |
Equal to |
|
|
!= |
Not equal to |
|
|
< |
Less than |
|
|
> |
Greater than |
|
|
<= |
Less than or equal to |
|
|
>= |
Greater than or equal to |
|
Operator |
Description |
|---|---|
|
+= |
Add and assign |
|
-= |
Subtract and assign |
|
*= |
Multiply and assign |
|
/= |
Divide and assign |
|
%= |
Modulus and assign (Remainder) |
|
Operator |
Description |
Example |
|---|---|---|
|
AND |
Returns |
|
|
OR |
Returns |
|
|
NOT |
Reverses the result of a condition |