Comparison Operators

The comparison operators include: !=, <, <=, <=>, >=, >, etc...

Title Description
!= Not equal operator.
< Less than operator.
<= Less than or equal operator.
<=> NULL-safe equal operator.
= Equal operator.
> Greater than operator.
>= Greater than or equal operator.
BETWEEN AND True if expression between two values.
COALESCE Returns the first non-NULL parameter
GREATEST Returns the largest argument.
IN True if expression equals any of the values in the list
INTERVAL Index of the argument that is less than the first argument
IS Tests whether a boolean is TRUE, FALSE, or UNKNOWN.
IS NOT Tests whether a boolean value is not TRUE, FALSE, or UNKNOWN
IS NOT NULL Tests whether a value is not NULL
IS NULL Tests whether a value is NULL
ISNULL Checks if an expression is NULL
LEAST Returns the smallest argument.
NOT BETWEEN Same as NOT (expr BETWEEN min AND max)
NOT IN Same as NOT (expr IN (value,...))
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/comparison-operators/