MySQL | MD5 Function Last Updated : 08 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The MySQL MD5 function is used to return an MD5 128-bit checksum representation of a string. The MD5 message-digest algorithm is a widely used hash function producing a 128-bit hash value. The value returned by the MD5 function is a binary string of 32 hexadecimal digits, or NULL if the argument was NULL. The return value can also be used as a hash key. The MD5 function accepts one parameter which is the string to be encrypted. Syntax: MD5( plain_string ) Parameters Used: plain_string - It is used to specify the plain text string that is to be encrypted. Return Value: The MD5 function in MySQL returns a binary string of 32 hexadecimal digits. Supported Versions of MySQL: MySQL 5.7 MySQL 5.6 MySQL 5.5 MySQL 5.1 MySQL 5.0 MySQL 4.1 Example-1: Implementing MD5 function on a string. SELECT MD5('xyz'); Output: d16fb36f0911f878998c136191af705e Example-2: Implementing MD5 function on a string with a combination of characters and integer values. SELECT MD5('xyz123'); Output: j89hj65l0355k878998c136191kl906w Example-3: Implementing MD5 function on a bigger string. SELECT MD5('geeksforgeeks'); Output: a6eb56f80be8a120436d6f1c9b8d87ca Example-4: Implementing MD5 function on a NULL string. SELECT MD5('NULL'); Output: NULL Comment More infoAdvertise with us Next Article MySQL | MD5 Function S Shubrodeep Banerjee Follow Improve Article Tags : SQL mysql SQLmysql Similar Reads MID() function in MySQL MID() : This function in MySQL is used to extract a substring from a given input string. If the starting position is a positive number, then the substring of the given length will be extracted from the starting index. If negative, then the substring of the given length will be extracted from the end 2 min read MySQL IF( ) Function The MySQL IF() function is a control flow function that returns different values based on the result of a condition. IF() Function in MySQLThe IF() function in MySQL returns a value if the condition is TRUE and another value if the condition is FALSE. The MySQL IF() function can return values that c 2 min read ORD() Function in MySQL ORD() function in MySQL is used to find the code of the leftmost character in a string . If the leftmost character is not a multibyte character, it returns ASCII value. And if the leftmost character of the string str is a multibyte character, ORD returns the code for that character, calculated from 3 min read MySQL | SHA1( ) Function The MySQL SHA1() function is used for encrypting a string using the SHA-1 technique. The SHA1 stands for secure hash algorithm and it produces a 160-bit checksum for a user inputted string. The MySQL SHA1() function returns NULL if the string passed as an argument is a NULL string. The SHA1() functi 1 min read MySQL | CONV( ) Function The MySQL CONV() function is used for converting a number from one numeric base system to another. The value returned by the CONV() function is in the form of a string value. It accepts three parameters which are the value to be converted, the current numeric base system and the numeric base system 2 min read Like