mysql>
mysql> SELECT 1 AND 0;
+---------+
| 1 AND 0 |
+---------+
| 0 |
+---------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT NOT(1 AND 0);
+--------------+
| NOT(1 AND 0) |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT !((1 OR 0) AND (0 OR 1));
+--------------------------+
| !((1 OR 0) AND (0 OR 1)) |
+--------------------------+
| 0 |
+--------------------------+
1 row in set (0.00 sec)
mysql>