Phone Number Columns in a Database

后端 未结 10 1123
暗喜
暗喜 2021-01-01 15:32

In the last 3 companies I\'ve worked at, the phone number columns are of type varchar(n). The reason being that they might want to store extensions (ext. 333). But in every

10条回答
  •  清酒与你
    2021-01-01 16:11

    one point with storing phone numbers is a leading 0.

    eg: 01202 8765432

    in an int column, the 0 will be stripped of, which makes the phone number invalid.

    I would hazard a guess at the - being swapped for spaces is because they dont actually mean anything

    eg: 123-456-789 = 123 456 789 = 123456789

提交回复
热议问题