Operator |
Purpose |
Example |
= |
Tests for equality. |
select * from customers where cust_state_province = 'UT'; |
!= |
Tests for inequality. |
select * from customers where cust_state_province != 'UT'; |
^= |
Same as !=. |
select * from customers where cust_state_province ^= 'UT'; |
<> |
Same as !=. |
select * from customers where cust_state_province <> 'UT'; |
< |
Less than. |
select * from sales where amount_sold < 100; |
> |
Greater than. |
|
<= |
Less than or equal to. |
select * from sales where amount_sold <= 500; |
>= |
Greater than or equal to. |
select * from sales where amount_sold >= 600; |
In |
Equal to any member in parentheses. |
select * from customers where cust_state_province is in ('UT,'CA','TX'); |
not in |
Not equal to any member in parentheses. |
select * from customers where cust_state_province is not in ('UT','CA','TX'); |
|