shiftleft
The shiftleft function is used to perform a signed left shift, shifting the binary representation of a left by b bits.
Syntax
shiftleft(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 8.
select shiftleft(1,3);
Returns 48.
select shiftleft(6,3);
Returns 48.
select shiftleft(6.123456,3.123456);
Returns NULL.
select shiftleft(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