EXPORT_SET()

Overview

Returns a string representation of a bits argument using the given values for on and off.

USAGE

EXPORT_SET(bits, on, off[, separator[, num_bits]])

Argument Name

Description

bits

The bits to be interpreted

on

The string to use for "on" bits

off

The string to use for "off" bits

separator

Optional. The separator to use when concatenating. Default: ","

num_bits

Optional. The number of bits to interpret. Default: 64

DETAILS

EXPORT_SET() is a string function that returns a string representation of a bits argument, using the given values for on and off.

The bits are examined from low-order to high-order, converting each bit into either the on or off string.

A NULL is returned if any of the function arguments is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT EXPORT_SET(2, 'Y', 'N', '|', 3);
+---------------------------------+
| EXPORT_SET(2, 'Y', 'N', '|', 3) |
+---------------------------------+
| N|Y|N                           |
+---------------------------------+
SELECT EXPORT_SET(18, 'Y', 'N', '', 10);
+----------------------------------+
| EXPORT_SET(18, 'Y', 'N', '', 10) |
+----------------------------------+
| NYNNYNNNNN                       |
+----------------------------------+
SELECT EXPORT_SET(3, '1', '', ',', 5);
+--------------------------------+
| EXPORT_SET(3, '1', '', ',', 5) |
+--------------------------------+
| 1,1,,,                         |
+--------------------------------+
SELECT EXPORT_SET(3, '1', '0', '', 5);
+--------------------------------+
| EXPORT_SET(3, '1', '0', '', 5) |
+--------------------------------+
| 11000                          |
+--------------------------------+

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