## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> LENGTH[LENGTH]:::quoted
LENGTH --> End((END))
```
## Purpose
The `LENGTH` SQL function gets for a `varchar2` the number of characters in provided text and for a `blob` the number of bytes in provided BLOB.
Parameters:
- Input (`blob` or `varchar2`): the value to process.
Returns: the length of the input as an `int32`.
## Examples
The following example retrieves the left three characters of a text:
```sql
select length('abcdefg')
----------------
7
```
The following example retrieves the left nine characters of a text:
```sql
select length(random_blob(512))
----------------
512
```