In a query filtering a boolean field named deactivated
I wondered why deactivated <> 1
does not yield the same results as (deactivated IS NULL OR deactivated=0)
. I found that the MariaDB syntax involving booleans is very crude: deactivated IS NOT true
does the correct thing, while the = and <> operators can lead to unexpected results. Not very intuitive.