[Solved] Load null values in a SQL Query WHERE clause


Your first clause in your WHERE is only going to match rows where died is not null. given that, you can reorder the clauses something like:

WHERE first_name NOT IN ('Hannah', 'Julia', 'Frasier')
  AND last_name NOT LIKE '%o%'
  AND (nationality <> 'German' 
    OR speciality <> 'Photo')
  AND ((died - born BETWEEN 50 AND 80 
      AND Died - born NOT IN (54, 56, 71, 76)) 
    OR died IS NULL)

This should bring back those that are currently alive.

1

solved Load null values in a SQL Query WHERE clause