SHIFTL()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns a number with its bits shifted to the left.
USAGE
SHIFTL(number, count)
Argument Name | Description |
|---|---|
| The starting number |
| The number of bit positions to shift to the left |
DETAILS
SHIFTL() is a bitwise function that returns the starting number after shifting the bits leftward count bit positions.
A NULL is returned if either argument is NULL.
The function call SHIFTL(x, y) behaves in exactly the same manner as the expression x << y.
EXAMPLES
SELECT SHIFTL(1, 0), SHIFTL(1, 1), SHIFTL(3, 2);
+--------------+--------------+--------------+
| SHIFTL(1, 0) | SHIFTL(1, 1) | SHIFTL(3, 2) |
+--------------+--------------+--------------+
| 1 | 2 | 12 |
+--------------+--------------+--------------+
