The not-equal operator checks whether two expressions have different values. SQL commonly supports <> and many systems also support !=.
Business analysis often requires excluding a particular category, status, or value from a dataset.
An analyst may retrieve employees whose status is not Inactive.
SELECT
EmployeeName,
Status
FROM Employees
WHERE Status <> 'Inactive';
Not-equal comparisons are used in filtering, exception reports, quality checks, and business rule analysis.
- <> is the standard SQL not-equal operator.
- Many databases also support !=.
- It is commonly used with WHERE.
- NULL values require special handling.
- It is useful for exclusion filters.
What is the SQL not-equal operator?
The standard SQL not-equal operator is <>; many database systems also support !=.
Does <> include NULL values?
No. NULL represents an unknown value and must be handled separately.