GETBIT
functionsupportedCore SQL functionsGiven an INTEGER value, returns the value of a bit at a specified position.
Syntax
GETBIT( <integer_expr>, <bit_position> )
Parameters
| Name | Required | Description |
|---|---|---|
integer_expr | required | This expression must evaluate to a data type that can be cast to an INTEGER value. |
bit_position | required | The position of the bit (starting from 0 for the least significant bit up to 127 for the most significant bit) for which to retrieve the value. |
Returns
The function returns the value of the bit (0 or 1) at the specified position.