Content-Length: 88461 | pFad | http://postgrespro.com/docs/postgrespro/17/functions-logical

Postgres Pro Standard : Documentation: 17: 9.1. Logical Operators : Postgres Professional

9.1. Logical Operators #

The usual logical operators are available:

boolean AND booleanboolean
boolean OR booleanboolean
NOT booleanboolean

SQL uses a three-valued logic system with true, false, and null, which represents unknown. Observe the following truth tables:

aba AND ba OR b
TRUETRUETRUETRUE
TRUEFALSEFALSETRUE
TRUENULLNULLTRUE
FALSEFALSEFALSEFALSE
FALSENULLFALSENULL
NULLNULLNULLNULL

aNOT a
TRUEFALSE
FALSETRUE
NULLNULL

The operators AND and OR are commutative, that is, you can switch the left and right operands without affecting the result. (However, it is not guaranteed that the left operand is evaluated before the right operand. See Section 4.2.14 for more information about the order of evaluation of subexpressions.)









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://postgrespro.com/docs/postgrespro/17/functions-logical

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy