I have a table of files, and there is a field called "document_type", which is filled with 1 or when it is not filled becomes NULL, the problem is that when I give SELECT
and I use the comparator to return all results with type_document other than 1 (AND tipo_documento <> 1)
, data that has NULL is not returned, why does this occur?
The way I found it to get around this was like this:
AND tipo_documento <> 1 OR tipo_documento IS NULL