Last answered:

27 May 2022

Posted on:

26 Mar 2022

0

Will "<0" (less than zero) include null values?

I have a column with values =0, >0, and null. If I have a condition where I want to select all values less than 0, including those null values, "<0" doesn't seem to include null values. Is this true? Thanks.

3 answers ( 0 marked as helpful)
Instructor
Posted on:

30 Mar 2022

0

Hi Christine!
Thanks for reaching out.

Could you please explain your questions with more words? Thank you.

Looking forward to your answer.
Best,
Tsvetelin

Posted on:

31 Mar 2022

0

I have a column where there are numbers >0, =0, and null. If I do a WHERE clause with condition less than or equal to 0, like "column_name <= 0", will the results include both 0 and null values? Or it has to be "WHERE column_name =0 or column_name is null"? Thanks.

Instructor
Posted on:

27 May 2022

0

Hi Christine!

You need two conditions. One checking for the records with value smaller or equal to 0 and another one checking for the null values

Hope this helps.
Best,
Tsvetelin

Submit an answer