/    /  MySQL – Not Equal

MySQL – Not Equal

 

not1

The MySQL Not Equal operator returns a set of rows following a comparison between two expressions that are not equal. MySQL contains two types of Not Equal operators: (< >) and (! =).

Difference Between (< >) and (! =) Operator

The Not Equal operator in MySQL is used to perform an inequality test between two expressions. It always produces the same result. They differ, however, in that the latter follows ISO standards whereas the former “! =” does not follow ISO standards.

Example 

1.(<>)

SELECT * FROM employees WHERE last_name <> "sluis";

not

2.(!=)

SELECT * FROM employees WHERE last_name != "sluis";

not