MAKE_SET()

Overview

Returns a string of comma-separated bit names that are enabled in a bit value.

USAGE

MAKE_SET(bits, name[, name ...])

Argument Name

Description

bits

The integer whose bits are analyzed

name

The string to use if the associated bit is enabled

DETAILS

MAKE_SET() is a string function that returns a string of comma-separated bit names enabled in the numeric value.

The numeric value is interpreted as a binary number with each bit (from low to high) corresponding to a name in the argument list.

If a bit's name is not specified or is NULL, that bit is not represented in the result.

The names of each enabled bit are concatenated together using a comma as the separator between multiple names and the resulting string is the return value.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT MAKE_SET(1, 'a', 'b', 'c');
+----------------------------+
| MAKE_SET(1, 'a', 'b', 'c') |
+----------------------------+
| a                          |
+----------------------------+
SELECT MAKE_SET(2|8, 'r', 'd', 'b', 'm', 's');
+----------------------------------------+
| MAKE_SET(2|8, 'r', 'd', 'b', 'm', 's') |
+----------------------------------------+
| d,m                                    |
+----------------------------------------+
SELECT MAKE_SET(2|4|8, 'r', NULL, 'b');
+---------------------------------+
| MAKE_SET(2|4|8, 'r', NULL, 'b') |
+---------------------------------+
| b                               |
+---------------------------------+

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