Categories: Bitwise
LSHIFT
Shifts the bits of the numeric expression to the left.
Syntax
LSHIFT(expression1 int32, expression2 int32) → int32
- expression1: Integer to shift.
- expression2: The number of bits to shift by.
Examples
LSHIFT exampleSELECT LSHIFT(1, 120)
-- 16777216
SELECT LSHIFT(16, 1)
-- 32
LSHIFT(expression1 int64, expression2 int64) → int64
- expression1: Integer to shift.
- expression2: The number of bits to shift by.
Examples
LSHIFT exampleSELECT LSHIFT(1, 120)
-- 16777216
SELECT LSHIFT(16, 1)
-- 32
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.