Skip to main content

Categories: Cryptography

MD5

Returns the MD5 hash of the input as a 32-character hexadecimal string.

Syntax​

MD5(expression any) → varchar​

  • expression: Value to hash. Accepts any type.

Examples

MD5 example
SELECT MD5('Dremio')
-- 288e0e9ab8b8ac8737afefecf16f61fd
Compute the MD5 hash of a string
SELECT MD5('hello')
-- 5d41402abc4b2a76b9719d911017c592
Compute the MD5 hash of a number
SELECT MD5(42)
-- a1d0c6e83f027327d8461063f4ac58a6
Compute the MD5 hash of a NULL value
SELECT MD5(NULL)
-- null