Categories:

String & binary functions (Checksum)

MD5_NUMBER — Obsoleted

返回 128 位 MD5 消息摘要,该消息摘要解释为带符号的 128 位大端数。此表示对于最有效的存储和比较 MD5 摘要非常有用。

See also:

MD5 , MD5_HEX, MD5_BINARY, MD5_NUMBER_LOWER64, MD5_NUMBER_UPPER64

语法

MD5_NUMBER(<msg>)

实参

msg

字符串表达式,要哈希处理的消息。

返回

A signed integer (NUMERIC(38, 0)).

This integer can be outside the range stored by NUMERIC(38, 0), so this function has been obsoleted.

使用说明

Although the MD5, MD5_BINARY, and MD5_NUMBER functions were originally developed as cryptographic functions, they are now obsolete for cryptography and should not be used for that purpose. They can be used for other purposes, for example as “checksum” functions to detect accidental data corruption.

示例

SELECT md5_number('Snowflake');

-----------------------------------------+
         MD5_NUMBER('SNOWFLAKE')         |
-----------------------------------------+
 -24002618010294540563082926240470284066 |
-----------------------------------------+