O'Reilly logo

MySQL in a Nutshell by Russell J.T. Dyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Logical Operators

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required