SQL Operators
You use SQL operators to specify comparisons and arithmetic operations between expressions.
You can use various types of SQL operators.
Operator | Example | Description | Syntax |
---|---|---|---|
BETWEEN |
|
Determines if a value is between two non-inclusive bounds.
|
|
IN |
|
Determines if a value is present in a set of values. |
|
IS NULL |
|
Determines if a value is null. |
|
LIKE |
|
Determines if a value matches all or part of a string. Often used with wildcard characters to indicate any character string match of zero or more characters (%) or any single character match (_). |
|
+ |
|
Plus sign for addition. |
|
- |
|
Minus sign for subtraction. |
|
* or X |
|
Multiply sign for multiplication. |
|
/ |
|
Divide by sign for division. |
|
% |
Percentage |
|
|
|| |
|
Character string concatenation. |
|
( |
|
Open parenthesis. |
|
) |
|
Close parenthesis. |
|
> |
|
Greater than sign, indicating values higher than the comparison. |
|
< |
|
Less than sign, indicating values lower than the comparison. |
|
= |
Equal sign, indicating the same value. |
|
|
>= |
Greater than or equal to sign, indicating values the same or higher than the comparison. |
|
|
<= |
Less than or equal to sign, indicating values the same or lower than the comparison. |
|
|
<> |
|
Not equal to, indicating values higher or lower, but different. |
|
, |
|
Comma, used to separate elements in a list. |
|