SQL BIT_COUNT()函數

BIT_COUNT(numeric_value)

BIT_COUNT()函數返回活躍在數字值的位數。 下面的例子演示了使用BIT_COUNT()函數返回激活位的數字爲一系列的數字:

SQL> SELECT
BIT_COUNT(2) AS TWO,
BIT_COUNT(4) AS FOUR,
BIT_COUNT(7) AS SEVEN
+-----+------+-------+
| TWO | FOUR | SEVEN |
+-----+------+-------+
| 1 | 1 | 3 |
+-----+------+-------+
1 row in set (0.00 sec)

0 條評論,你可以發表評論,我們會進行改進
Comment author placeholder