Comparison
Comparison operators
Operator | Description |
---|---|
| |
| |
| |
| |
| |
| Equal (non-standard but popular syntax) |
| |
| Not equal (non-standard but popular syntax) |
Less than
Returns true
when the first value is less than the second value (e.g. 2 < 1
returns false
while 1 < 2
would return true
).
Example
SQL
Query result
orderid | nettotal |
---|---|
229NOEFdC5 | 0 |
uCTz0C6fB8 | 128 |
FGliNwk2lb | 381.21 |
Greater than
Returns true
when the first value is greater than the second value (e.g. 1 > 2
returns false
while 2 > 1
would return true
).
Example
SQL
Query result
orderid | nettotal |
---|---|
BegfDveBnB | 865.4 |
nxeYxV9ojw | 1261.62 |
RVsaqkW46f | 2549.26 |
Less than or equal to
Returns true
when the first value is less than or equal to the second value (e.g. 1.1 <= 1
returns false
while 1 <= 1
would return true
).
Example
SQL
Query result
orderid | nettotal |
---|---|
UJvGCRv2hO | 217.98 |
k95KKOBHxi | 231.03 |
Ba3bKHFKvq | 0 |
Greater than or equal to
Returns true
when the first value is greater than or equal to the second value (e.g. 1 >= 1.1
returns false
while 1 >= 1
would return true
).
Example
SQL
Query result
orderid | nettotal |
---|---|
ShCjHSzsEy | 817.18 |
BJNVAJHS97 | 1145.89 |
9TyAPyua8A | 1913.95 |
Equal
Returns true
when the first value is equal to the second value (e.g. 1 = 2
returns false
while 1 = 1
would return true
).
Example
SQL
Query result
orderid | shippinginfo_address_city |
---|---|
SDdDy6C7qO | Rochester |
8ZNYcSSY0B | East Meadow |
8lfbwMVMoY | Shirley |
Not equal
Returns true
when the first value is equal to the second value (e.g. 1 != 1
returns false
while 1 != 2
would return true
).
Example
SQL
Query result
orderid | shippinginfo_address_state |
---|---|
aMIV6S5euH | ND |
mRmHJfMDey | MD |
UCQjGukrlW | KY |
Last updated