Operators Overview
Arithmetic Operators
| Name | Description |
|---|---|
| %,MOD | Modulo operator |
| * | Multiplication operator |
| + | Addition operator |
| - | Minus operator |
| - | Change the sign of the argument |
| / | Division operator |
| DIV | Integer division |
Assignment Operators
| Name | Description |
|---|---|
| = | Equal operator |
Bit Functions and Operators
| Name | Description |
|---|---|
| & | Bitwise AND |
| >> | Right shift |
| << | Left shift |
| ^ | Bitwise XOR |
| ~ | Bitwise inversion |
Cast Functions and Operators
| Name | Description |
|---|---|
| CAST() | Cast a value as a certain type |
| CONVERT() | Cast a value as a certain type |
Comparison Functions and Operators
| Name | Description |
|---|---|
| > | Greater than operator |
| >= | Greater than or equal operator |
| < | Less than operator |
| <>,!= | Not equal operator |
| <= | Less than or equal operator |
| = | Equal operator |
| BETWEEN … AND … | Whether a value is within a range of values |
| 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 |
| NOT BETWEEN … AND … | Whether a value is not within a range of values |
| NOT LIKE | Negation of simple pattern matching |
| COALESCE | Return the first non-null value in a list |
Flow Control Functions
| Name | Description |
|---|---|
| CASE | Case operator |
| IF() | If/else construct |
Logical Operators
| Name | Description |
|---|---|
| AND,&& | Logical AND |
| NOT,! | Negates value |
| OR | Logical OR |
| XOR | Logical XOR |
