## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> | | SHA256[SHA256]:::quoted
SHA256 --> End((END))
```
## Purpose
The `SHA256` SQL function calculates hash value for parameter according to SHA256 algorithm.
See also [[SHA1]], [[SHA384]] and [[SHA512]].
Parameters:
- Value (`varchar2` or `blob`): text or BLOB to calculate SHA256 hash value for.
Returns: Hash value.
## Examples
The following example retrieves the SHA256 hash of `abcde`:
```sql
select sha256('abcde')
----------------------------------------------------------------
36bbe50ed96841d10443bcb670d6554f0a34b761be67ec9c4a8ad2c0c44ca42c
```
The following example returns `null` since the input is `null`:
```sql
select sha256(null)
-------------------
```