Store phone numbers as strings, not numbers.
- Phone numbers are identifiers that happen to use digits.
- Phone numbers starting with zero are valid, but may be interpreted as octal by a programming language.
Strip the phone number to only digits and store the extension in a separate field.
- This will allow for uniform formatting later.
For US, strip the prepending ’1′ digit
- Determine formatting based on length of the string (10 digits for US).
Pingback: Masao Kitamura » MySQL Best Data Types For Common Types Of Data