The WHERE Clause Operators
The first WHERE clause we looked at tests for equality—determining if a column contains a specific value. SQL supports a whole range of conditional operators as listed in Table 4.1.
Operator | Description |
---|---|
= | Equality |
<> | Non-equality |
!= | Non-equality |
< | Less than |
<= | Less than or equal to |
!< | Not less than |
> | Greater than |
>= | Greater than or equal to |
!> | Not greater than |
BETWEEN | Between two specified values |
IS NULL | Is a NULL value |
Operator Compatibility Some of the operators listed in Table 4.1 are redundant (for example, <> is the same as !=. !< (not less than) accomplishes the same effect as >= (greater than or equal ... |
Get Sams Teach Yourself SQL in 10 Minutes, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.