Logical Operators
The usual logical operators include AND, OR, and NOT. SQL uses a three-valued logical system with true, false, and null, which represents “unknown”. Their priorities are NOT > AND > OR.
Table 1 lists the calculation rules, where a and b represent logical expressions.
Table 1 Operation rules
NOTE:
The operators AND and OR are commutative, that is, you can switch the left and right operand without affecting the result.
Feedback