MD5()

Overview

Returns the MD5 checksum for the given string argument.

USAGE

MD5(string)

Argument Name

Description

string

The input string

DETAILS

MD5() is a cryptographic hash function that returns the MD5 checksum for a string argument.

The 128-bit hash value is returned as a string of 32 hexadecimal digits.

A NULL is returned if the argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT MD5('hello');
+----------------------------------+
| MD5('hello')                     |
+----------------------------------+
| 5d41402abc4b2a76b9719d911017c592 |
+----------------------------------+
CREATE TABLE md5_example (
  chksum BINARY(16)
);
INSERT INTO md5_example VALUES
  (UNHEX(MD5('first'))),
  (UNHEX(MD5('second')));
SELECT HEX(chksum)
 FROM md5_example;
+----------------------------------+
| HEX(chksum)                      |
+----------------------------------+
| 8B04D5E3775D298E78455EFC5CA404D5 |
| A9F0E61A137D86AA9DB53465E0801612 |
+----------------------------------+

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