Not equal to the query condition in MySQL: use the != operator to indicate not equal. For example: SELECT * FROM table_name WHERE column_name != value;
In MySQL, it means not equal to
Query condition:
In MySQL, use !=
to indicate not equal.
Example:
<code class="sql">SELECT * FROM table_name WHERE column_name != value;</code>
Detailed description:
!=
Operator compares two expressions formula and returns a Boolean value (TRUE
or FALSE
). If the two expressions are not the same, TRUE
is returned; otherwise, FALSE
is returned.
Other inequality operators:
In addition to the !=
operator, there are some other inequality operators:
<>
: Same as !=
, indicating not equal. NOT
: Negation operator. When used with a comparison operator, its result is inverted (for example, NOT =
means equal). Note: The
!=
and <>
operators have the same priority. <>
instead of !=
to improve code readability. The above is the detailed content of How to write not equal in mysql. For more information, please follow other related articles on the PHP Chinese website!