MySQL Tutorial

A database system used with PHP.

MySQL AND, OR, NOT

MySQL AND, OR and NOT Operators

The WHERE clause can be combined with AND, OR, and NOT operators.

  • AND: Displays a record if all the conditions separated by AND are TRUE.
  • OR: Displays a record if any of the conditions separated by OR is TRUE.
  • NOT: Displays a record if the condition(s) is NOT TRUE.

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics