## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> METAPHONE[METAPHONE]:::quoted
METAPHONE --> End((END))
```
## Purpose
The `METAPHONE` SQL function converts a value to the Metaphone code as defined on [Wikipedia](https://en.wikipedia.org/wiki/Metaphone).
See also [[DMETAPHONE]], [[METAPHONE3]] and [[SOUNDEX]].
Parameters:
- Input (`varchar2`): value to convert to metaphone.
- Length (`int32`): maximum output length of the given input.
Returns: the input converted to metaphone, with a given output length.
## Examples
The following example retrieves the metaphone of `Stephen`:
```sql
select metaphone('Stephen', 100)
-------------------
STFN
```
The following example retrieves the metaphone of `Ronald`:
```sql
select metaphone('Ronald', 100)
-------------------
RNLT
```