Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回位数组中指定位的值(1 或 0)。
GET_BIT( bit-expression, position )
bit-expression 包含该位的位数组。
position 要返回状态的位的位置。
BIT
数组中的位置从左侧开始计数(从 1 开始)。
如果 position 超出数组的长度,则返回 0 (false)。
SQL/2008 服务商扩充。
以下语句返回值 1:
SELECT GET_BIT( '00110011' , 4 );
以下语句返回值 0:
SELECT GET_BIT( '00110011' , 5 );