Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回数组中设为 1 (TRUE) 的位数的计数。
COUNT_SET_BITS( bit-expression )
bit-expression 要确定置位的位数组。
UNSIGNED INT
如果 bit-expression 为 NULL,则返回 NULL。
SQL/2008 服务商扩充。
以下语句返回值 4:
SELECT COUNT_SET_BITS( '00110011' );
以下语句返回值 12:
SELECT COUNT_SET_BITS( '0011001111111111' );