Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
9.1. Logical Operators
Prev UpChapter 9. Functions and OperatorsHome Next

9.1. Logical Operators#

The usual logical operators are available:

booleanANDbooleanbooleanbooleanORbooleanbooleanNOTbooleanboolean

SQL uses a three-valued logic system with true, false, andnull, which representsunknown. Observe the following truth tables:

aba ANDba ORb
TRUETRUETRUETRUE
TRUEFALSEFALSETRUE
TRUENULLNULLTRUE
FALSEFALSEFALSEFALSE
FALSENULLFALSENULL
NULLNULLNULLNULL

aNOTa
TRUEFALSE
FALSETRUE
NULLNULL

The operatorsAND andOR 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. SeeSection 4.2.14 for more information about the order of evaluation of subexpressions.)


Prev Up Next
Chapter 9. Functions and Operators Home 9.2. Comparison Functions and Operators
pdfepub
Go to Postgres Pro Standard 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp