M
M
McMike2017-07-21 08:02:26
PostgreSQL
McMike, 2017-07-21 08:02:26

Why does postgres treat null as not matching !=true?

Found that the !=true condition doesn't select rows where this value = null
Why? Are there settings for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2017-07-21
@longclaps

Because null is not equal to anything (even null is not equal), this is one of the concepts of RDBMS theory. Check the field for IS NULL and you'll be fine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question