&

Sintassi

&

Spiegazione

AND tra bit. Converte i valori in binari e li confronta come bit. Solo se entrambi i bit corrispondenti sono 1 anche il bit risultante è 1.

Si veda OR tra bit.

Esempi

MariaDB [(none)]> SELECT 2&1;
+-----+
| 2&1 |
+-----+
|   0 |
+-----+

MariaDB [(none)]> SELECT 3&1;
+-----+
| 3&1 |
+-----+
|   1 |
+-----+

MariaDB [(none)]> SELECT 29 & 15;
+---------+
| 29 & 15 |
+---------+
|      13 |
+---------+

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.