Logical AND(AND, &&) : AND « Logic Operator « MySQL Tutorial






Evaluates to 1 if all operands are non-zero and not NULL.

Evaluates to 0 if one or more operands are 0.

Otherwise NULL is returned.

mysql>
mysql> SELECT 1 && 1;
+--------+
| 1 && 1 |
+--------+
|      1 |
+--------+
1 row in set (0.00 sec)

mysql> SELECT 1 && 0;
+--------+
| 1 && 0 |
+--------+
|      0 |
+--------+
1 row in set (0.00 sec)

mysql>








8.2.AND
8.2.1.Logical AND(AND, &&)
8.2.2.Using Logical AND Operator with NULL value
8.2.3.Using AND to link two conditions