> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BITWISE_SHIFT_LEFT

> Shifts an integer left by a number of bit positions.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

**Aliases:** [`shiftleft`](/query/sql/functions/bitwise/shiftleft)

Returns NULL when an argument is NULL.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
bitwise_shift_left(value, shift)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | INTEGER | Yes | The integer to shift. |
| shift | INTEGER | Yes | The number of bit positions to shift. |

## Returns

* Type: INT for TINYINT, SMALLINT and INT input; BIGINT for BIGINT input
* Possible values: The shifted integer, using its converted 32-bit or 64-bit type.
* NULL behavior: Returns NULL when an argument is NULL.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Usage notes

* The shift amount is normalized modulo the integer width. Negative and large amounts wrap into the range 0 through width - 1.
* TINYINT and SMALLINT inputs are promoted to INT.

## Examples

### Shift and NULL input

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT bitwise_shift_left(CAST(1 AS INT), 2) AS shifted, bitwise_shift_left(CAST(NULL AS INT), 2) AS null_value;
```

| shifted | null\_value |
| - | - |
| 4 | NULL |

### Shift a integer value

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT bitwise_shift_left(CAST(3 AS INT), 2) AS shifted;
```

| shifted |
| - |
| 12 |

## Limitations

* TINYINT and SMALLINT inputs produce INTEGER results. Query tools may still report the input type. Use INTEGER or BIGINT inputs to avoid this mismatch.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.