SHIFTR()

Overview

Returns a number with its bits shifted to the right.

USAGE

SHIFTR(number, count)

Argument Name

Description

number

The starting number

count

The number of bit positions to shift to the right

DETAILS

SHIFTR() is a bitwise function that returns the starting number after shifting the bits rightward count bit positions.

A NULL is returned if either argument is NULL.

The function call SHIFTR(x, y) behaves in exactly the same manner as the expression x >> y.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT SHIFTR(5, 1), SHIFTR(5, 2), SHIFTR(5, 3);
+--------------+--------------+--------------+
| SHIFTR(5, 1) | SHIFTR(5, 2) | SHIFTR(5, 3) |
+--------------+--------------+--------------+
|            2 |            1 |            0 |
+--------------+--------------+--------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES