MySQL MD5() function
MD5() function
MySQL MD5() Calculates an MD5 128-bit checksum for a string. The value is returned as a binary string of 32 hex digits, or NULL if the argument was NULL. The return value can, for example, be used as a hash key.
Syntax:
MD5(str);
Argument:
Name | Description |
---|---|
str | A string whose MD5 value is to be calculated. |
Syntax Diagram:

MySQL Version: 5.6
Example:
Code:
SELECT MD5('w3resource');
Explanation:
The above MySQL statement returns MD5 value of w3resource. The return value is b273cb2263eb88f61f7133cd308b4064.
Sample Output:
mysql> SELECT MD5('w3resource'); +----------------------------------+ | MD5('w3resource') | +----------------------------------+ | b273cb2263eb88f61f7133cd308b4064 | +----------------------------------+ 1 row in set (0.04 sec)
Previous: ENCRYPT()
Next: OLD_PASSWORD()
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook