Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 823 Bytes

File metadata and controls

33 lines (24 loc) · 823 Bytes
description
Returns a hash value of the arguments. HASH does not return NULL, even for NULL inputs.

HASH

Syntax

HASH(expression any) → numeric

  • expression: Can be a general expression of any Spice supported data type.

Examples

{% code title="HASH example" %}

SELECT HASH(host_id)
FROM eth.recent_blocks 
LIMIT 5

-- 1110609030
-- 1283762365
-- -1745730253
-- 0
-- 0

{% endcode %}

Usage Notes

HASH is a proprietary function that can accept different input expressions of arbitrary Spice supported data types and returns a signed value. It is not a cryptographic hash function and should not be used as such.