## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> | | PHONE_NUMBER_TYPE[PHONE_NUMBER_TYPE]:::quoted PHONE_NUMBER_TYPE --> End((END)) ``` ## Purpose The `PHONE_NUMBER_TYPE` SQL function evaluates to the type of phone number: FIXED_LINE: fixed landline, FIXED_LINE_OR_MOBILE: either fixed landline phone or mobile number, MOBILE: mobile phone number, PAGER: pager, PERSONAL_NUMBER: personal phone number, PREMIUM_RATE: premium rate, SHARED_COST: shared cost, TOLL_FREE: toll-free, UAN: Universal Access Number; a phone number that can be accessed without dialing geographic area codes, UNKNOWN: unknown type, VOICEMAIL: voicemail, VOIP: VoIP. In case no country is specified, an [E.164 notation](https://www.itu.int/rec/T-REC-E.164) is required. See also [[IS_PHONE_NUMBER]], [[PHONE_NUMBER_TO_E164]], [[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](https://www.iso.org/standard/72482.html). Returns: Type of phone number. ## Examples The following example retrieves the type of a Dutch mobile phone number: ```sql select phone_number_type('+31612345678') ------------------- MOBILE ``` The following example retrieves the type of a Dutch Universal Access Number: ```sql select phone_number_type('0880026500', 'NL') ------------------- UAN ```