DECODE()

Overview

Decrypts the string using the given key.

USAGE

DECODE(encrypt_string, password_string)

Argument Name

Description

encrypt_string

The encrypted string to decode

password_string

The password to use

DETAILS

DECODE() is a string function that decodes and returns a string that was previously encoded using ENCODE().

The password_string value must match the one used when the string was encoded.

A NULL is returned if any argument is NULL.

For the opposite conversion, see ENCODE().

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SET @data = HEX(ENCODE('information', '1@mariadb-#'));
SELECT DECODE(UNHEX(@data), '1@mariadb-#');
+-------------------------------------+
| DECODE(UNHEX(@data), '1@mariadb-#') |
+-------------------------------------+
| information                         |
+-------------------------------------+

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