IS operator in SQL?The IS operator is used only to compare with NULL.
In SQL:
= cannot be used to check NULLNULL means unknown / missing valueTo check if a value is NULL
To check if a value is NOT NULL
= with NULL?NULL = NULL is not true.
SQL treats NULL as unknown, not a value.
That's why:
❌ WHERE allergy = NULL → wrong
✔ WHERE allergy IS NULL → correc
Used to search for a pattern in text.