The GET_SQL_HASH function calculates the hash value of a specified string using MD5.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_UTILITY.GET_SQL_HASH (
NAME IN VARCHAR2,
HASH OUT RAW,
PRE10IHASH OUT NUMBER)
RETURN NUMBER;
Parameters
| Parameter | Description |
|---|---|
| name | The string to be hashed. |
| hash | An optional field for storing the 16-byte hash value. |
| pre10ihash | This parameter is not supported in the current version, and the result is NULL. |
Return value
The hash value of the input string (last 4 bytes).
MD5 calculates a 16-byte hash value, but only returns the last 4 bytes as a numeric value. You can use the optional parameter to obtain all 16 bytes.
