Compare different value, value "null" does not enter the backup

0

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
    
asked by anonymous 27.08.2017 / 18:55

1 answer

0

What is the field type?

It was really meant to work only with AND tipo_documento IS NULL .

    
27.08.2017 / 19:03