Mysql Md5 Function
MySQL: MD5 Function
This tutorial explains how to use the MySQL MD5 function with syntax and examples.
Description
The MySQL MD5 function returns an MD5 128-bit checksum representation of a string.
Syntax
The syntax for the MD5 function in MySQL is:
Parameters or Arguments
- string
The plaintext string used to generate the MD5 128-bit checksum.
Note
- The MD5 function will return a 32 character hex string as the result.
- The MD5 function will return NULL, if the string was NULL.
- The result from the MD5 function can be used a hash key.
Applies To
The MD5 function can be used in the following versions of MySQL:
- MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23.2
Example
Let's look at some MySQL MD5 function examples and explore how to use the MD5 function in MySQL.
For example: