## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> | | PHONE_NUMBER_TO_E164[PHONE_NUMBER_TO_E164]:::quoted PHONE_NUMBER_TO_E164 --> End((END)) ``` ## Purpose The `PHONE_NUMBER_TO_E164` SQL function evaluates to the phone number in [E.164 notation](https://en.wikipedia.org/wiki/E.164) format. In case no country is specified, an E.164 notation is required. See also [[IS_PHONE_NUMBER]], [[PHONE_NUMBER_TYPE]], [[PHONE_NUMBER_TO_NATIONAL]] and [[PHONE_NUMBER_TO_INTERNATIONAL]]. Parameters: - Phone (`varchar2`): phone number as text. - Country (optional, `varchar2`): country code as ISO 3166-1 alpha-2 code. Returns: Phone number in E.164 notation format. ## Examples The following example converts a Dutch national phone number to E.164 notation: ```sql select phone_number_to_e164('088 002 6500', 'NL') ------------------- +31880026500 ``` The following example converts a Dutch mobile phone number without specifying a country, requiring the phone number to already be in E.164 notation: ```sql select phone_number_to_e164('+31612345678') ------------------- +31612345678 ```