Quantcast
Channel: isnull variation
Viewing all articles
Browse latest Browse all 4

isnull variation

$
0
0

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.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>