sha256()

Returns a VARCHAR with the SHA-256 hash of the blob.

Arguments & returns

2 overloads

sha256(blob)

Scalar
Overload link blob Returns
#01 BLOB VARCHAR

sha256(value)

Scalar

Returns a VARCHAR with the SHA-256 hash of the value

Overload link value Returns
#02 VARCHAR VARCHAR

Example

1 more ↓
sha256 example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

More examples

sha256 example 2
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

In other engines

Exasolhash_sha256()

HASH_SHA256(x)
In DuckDB
SHA256(x)

SQLGlot example ↗

Used in larger rewrites 2

These examples use sha256 as one part of a larger SQL translation.

BigQuerysha256()

SHA256(x)
In DuckDB
UNHEX(SHA256(x))

SQLGlot example ↗

Prestosha256()

SELECT SHA256(x)
In DuckDB
SELECT UNHEX(SHA256(x))

SQLGlot example ↗