The equal to operator (=) checks whether two expressions have the same value.
Equality comparisons are fundamental to filtering records and matching business conditions.
Find employees whose department is IT.
SELECT
EmployeeName,
Department
FROM Employees
WHERE Department = 'IT';
The equal operator is widely used for filtering departments, statuses, IDs, categories, and other exact business values.
- The equal operator is =.
- It checks whether values match.
- It is commonly used in WHERE.
- It can compare numbers, text, dates, and expressions.
- NULL requires IS NULL instead.
What operator is used for equality in SQL?
The equal sign (=) is used to compare whether two expressions have the same value.
Can = be used to find NULL values?
No. NULL should be checked using IS NULL.