MYSQL in a Nutshell (In a Nutshell (OReilly))

Logical operators are used for evaluating values or expressions for true, false, or unknown. Table B-3 lists allowable logical operators.

Table B-3. Logical operators

Operator

Use

AND

Logical AND

&&

Logical AND

IS boolean

Logical equal

IS NOT boolean

Logical equal

OR

Logical OR

||

Logical OR

NOT

Logical NOT

!

Logical NOT

XOR

Logical XOR

The operators IS and IS NOT are being added in Version 5.0.2 of MySQL. A boolean value of trUE, FALSE, or UNKNOWN should immediately follow these operators.

Категории