shiftrightunsigned
The shiftrightunsigned function is used to perform an unsigned right shift, shifting the binary representation of a right by b bits.
Syntax
shiftrightunsigned(BIGINT a, BIGINT b)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| a | Yes | DOUBLE, BIGINT, DECIMAL, or STRING | The format of parameter a includes floating-point format, integer format, and string format. If parameter a is not of type BIGINT, it is implicitly converted to BIGINT type before evaluation. |
| b | Yes | DOUBLE, BIGINT, DECIMAL, or STRING | The format of parameter b includes floating-point format, integer format, and string format. If parameter b is not of type BIGINT, it is implicitly converted to BIGINT type before evaluation. |
Return Values
Returns a value of type INT.
If a or b is NULL, NULL is returned.
Example Code
Returns 2.
select shiftrightunsigned(16,3);
Returns 536870910.
select shiftrightunsigned(-16,3);
Returns 2.
select shiftrightunsigned(16.123456,3.123456);
Returns NULL.
select shiftrightunsigned(null,3);
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot