在手机的SQL varchar(长度)中,我应该考虑全球最长的电话号码 [英] What's the longest possible worldwide phone number I should consider in SQL varchar(length) for phone

查看:775
本文介绍了在手机的SQL varchar(长度)中,我应该考虑全球最长的电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意事项:


  • +国家/地区代码

  • ()区号

  • x + 6个扩展名的数字(所以使它成为8 {空格})

  • 组之间的空格(即美国手机+ x xxx xxx xxxx = 3个空格) / li>
  • 这里是我需要你帮助的地方,我想要在全球范围内

  • + for country code
  • () for area code
  • x + 6 numbers for Extension extension (so make it 8 {space})
  • spaces between groups (i.e. in American phones +x xxx xxx xxxx = 3 spaces)
  • here is where I need your help, I want it to be worldwide

我的具体情况现在,我不需要卡等号码从国家代码开始,以扩展名结尾,没有传真/电话等评论,也不需要打电话卡。

Consider that in my particular case now, I don't need cards etc. number begins with country code and ends with the extension, no Fax/Phone etc. comments, nor calling card stuff needed.

推荐答案

考虑到varchar(30)和varchar(100)之间没有开销差异,如果您只在每个存储20个字符,错误的一方谨慎,只是使它成为50。

Well considering there's no overhead difference between a varchar(30) and a varchar(100) if you're only storing 20 characters in each, err on the side of caution and just make it 50.

这篇关于在手机的SQL varchar(长度)中,我应该考虑全球最长的电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆