This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- takes the leftmost 16 hex-characters of the md5 hash of foo, converts it to base-10, and casts it to a 64-bit number | |
-- Note: this decreases the possible space of hashes! | |
SELECT CAST(conv(substring(md5("foo"), 0, 16), 16, 10) AS BIGINT)"); |