Left shift
Shifts the bits of the left integer operand left by the number of positions in the right operand.
Category: bitwise
SQL symbol: <<
Syntax
sql
<value> << <count>Parameters
<value>— The integer whose bits are shifted. Acceptsinteger.<count>— How many positions to shift by, 0..63. Acceptsinteger.
Returns
Examples
sql
SELECT 1 << 4;16
Signatures
integer << integer→ integer
Notes
The shift count must be 0..63 - the operands are 64-bit integers, and a count outside that range fails loud ('bitwise_shl: shift count out of range') rather than wrapping or saturating.