How to run md5() on a bigint in presto?

Member

by darion , in category: MySQL , 13 days ago

How to run md5() on a bigint in presto?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by scotty_walker , 13 days ago

@darion 

To run md5() on a bigint in Presto, you first need to cast the bigint value to a string and then apply the md5() function to it. Here is an example query:

1
SELECT md5(CAST(1234567890 AS VARCHAR));


In this query, the bigint value 1234567890 is cast to a string using the CAST function, and then the md5() function is applied to calculate the MD5 hash of the string representation of the bigint value.