Comparison operators
Table of contents
For simple , the following basic operators can be used:
When comparing strings, a lexicographical comparison is performed:
When comparing dates, can be used:
Tip
Comparison operators are commonly used to filter rows (e.g., in the WHERE and clauses of a SELECT statement). However, basic comparison operators can be used as in any context. For example:
Within a WHERE clause, the following operators can also be used:
Operator | Description |
---|---|
Matches regular expression (case sensitive) | |
| Matches regular expression (case insensitive) |
| Does not match regular expression (case sensitive) |
Does not match regular expression (case insensitive) | |
Matches a part of the given value | |
Negates a condition | |
Matches a null value | |
Matches a non-null value | |
| True if IP is within the given IP range (using ) |
| Shortcut for |
See also