4

Why does null and true evaluate to null in PostgreSQL but null or true evaluates to true?

I would have thought using null with and or or would've evaluated to null in both cases?

asked Dec 21, 2017 at 23:27
1
  • There are some truth tables and details at NULL and three-valued logic Commented Dec 21, 2017 at 23:48

1 Answer 1

1
  • OR is defined that if either side is true the expression evaluates to true.
  • AND is defined such that if both sides are true boolean-3VL context, the expression evaluates to true;
  • null is not true.
answered Dec 22, 2017 at 1:13
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.