I am not used to working with NULL and i am facing some problems. For example one would think that this query returns all customers:
SELECT * from customers WHERE ( job LIKE '%expert%' OR job NOT LIKE '%expert%' )
But reality is that it won't return customers with a NULL job.
That's an example. A more real world query could be:
SELECT * from customers WHERE NOT ( job LIKE '%expert%' )
And to work properly it could be rewritten like:
SELECT * from customers WHERE NOT ( job IS NOT NULL AND job LIKE '%expert%' )
What's the best way of dealing with this NULL in logical subexpressions? I am mainly a PHP programmer for small scripts (i'm not used to ORM or other frameworks).