Get started
Load & manage data
Work with data
Administration
Reference & resources
Updated Sep 29, 2023
Send us feedback
shiftleft
Applies to: Databricks SQL Databricks Runtime
Returns a bitwise left shifted by n bits.
n
shiftleft(expr, n)
expr: An INTEGER or BIGINT expression.
expr
n: An INTEGER expression.
The result matches the type of expr.
If n is less than 0 the result is 0.
> SELECT shiftleft(2, 1); 4
shiftright function
shiftrightunsigned function