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