I'm trying to understand someone else's use of isnull in a where clause. The part of the where clause containing "= 1" is confusing.
SELECT FIELD1
FROM MY_TABLE
WHERE isnull(FIELD2, 0) = 1
There is a value in FIELD1 in MY_TABLE and FIELD2 is empty, i.e., null. The above query returns only the column label "FIELD1". What is the above query trying to do and why doesn't it return the contents of FIELD1?
Thanks.