Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.03 KB

File metadata and controls

49 lines (37 loc) · 1.03 KB
description
Shifts the bits of the numeric expression to the left.

LSHIFT

Syntax

LSHIFT(expression1 int32, expression2 int32) → int32

  • expression1: Integer to shift.
  • expression2: The number of bits to shift by.

Examples

{% code title="LSHIFT example" %}

SELECT LSHIFT(1, 120)
-- 16777216

{% endcode %}

{% code title="LSHIFT example" %}

SELECT LSHIFT(16, 1)
-- 32

{% endcode %}

LSHIFT(expression1 int64, expression2 int64) → int64

  • expression1: Integer to shift.
  • expression2: The number of bits to shift by.

Examples

{% code title="LSHIFT example" %}

SELECT LSHIFT(1, 120)
-- 16777216

{% endcode %}

{% code title="LSHIFT example" %}

SELECT LSHIFT(16, 1)
-- 32

{% endcode %}