NULL handling

Database

NULL handling

A basic question!

I have a table which has a column defined as Integer and with NULLS.
The existing code checks whether this column = 0 or column >0 . If yes, it inserts into another table.
Now, will the NULLS be inserted too ?

I tried this and as per my test, teh NULLS will not be inserted . But I would like a confirmation from teh experts or a reference which explains handling of NULLS.

Thank you!
1 REPLY

Re: NULL handling

That's standard SQL behavior. Read about "three-valued logic" in any basic SQL textbook. The only predicate operator that returns true with a null operand is IS NULL.