## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> | | PHONE_NUMBER_TO_NATIONAL[PHONE_NUMBER_TO_NATIONAL]:::quoted PHONE_NUMBER_TO_NATIONAL --> End((END)) ``` ## Purpose The `PHONE_NUMBER_TO_NATIONAL` SQL function evaluates to the phone number in national notation format. In case no country is specified, an E.164 notation is required. See also [[IS_PHONE_NUMBER]], [[PHONE_NUMBER_TYPE]], [[PHONE_NUMBER_TO_E164]] 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 national notation format. ## Examples The following example converts a phone number in E.164 notation to Dutch national notation: ```sql select phone_number_to_national('+31880026500') ------------------- 088 002 6500 ``` The following example interprets the same digits as a Swiss phone number, resulting in a different national notation: ```sql select phone_number_to_national('0880026500', 'CH') ------------------- 880026500 ```