• <bdo id='j89fy'></bdo><ul id='j89fy'></ul>

      <small id='j89fy'></small><noframes id='j89fy'>

      <i id='j89fy'><tr id='j89fy'><dt id='j89fy'><q id='j89fy'><span id='j89fy'><b id='j89fy'><form id='j89fy'><ins id='j89fy'></ins><ul id='j89fy'></ul><sub id='j89fy'></sub></form><legend id='j89fy'></legend><bdo id='j89fy'><pre id='j89fy'><center id='j89fy'></center></pre></bdo></b><th id='j89fy'></th></span></q></dt></tr></i><div id='j89fy'><tfoot id='j89fy'></tfoot><dl id='j89fy'><fieldset id='j89fy'></fieldset></dl></div>

      1. <legend id='j89fy'><style id='j89fy'><dir id='j89fy'><q id='j89fy'></q></dir></style></legend>

        <tfoot id='j89fy'></tfoot>

        如何在 MySQL 数据库中存储电话号码?

        How to store phone numbers on MySQL databases?(如何在 MySQL 数据库中存储电话号码?)
        <tfoot id='EYoKg'></tfoot>
        <legend id='EYoKg'><style id='EYoKg'><dir id='EYoKg'><q id='EYoKg'></q></dir></style></legend>
          <tbody id='EYoKg'></tbody>

        • <bdo id='EYoKg'></bdo><ul id='EYoKg'></ul>

            1. <small id='EYoKg'></small><noframes id='EYoKg'>

              <i id='EYoKg'><tr id='EYoKg'><dt id='EYoKg'><q id='EYoKg'><span id='EYoKg'><b id='EYoKg'><form id='EYoKg'><ins id='EYoKg'></ins><ul id='EYoKg'></ul><sub id='EYoKg'></sub></form><legend id='EYoKg'></legend><bdo id='EYoKg'><pre id='EYoKg'><center id='EYoKg'></center></pre></bdo></b><th id='EYoKg'></th></span></q></dt></tr></i><div id='EYoKg'><tfoot id='EYoKg'></tfoot><dl id='EYoKg'><fieldset id='EYoKg'></fieldset></dl></div>

                • 本文介绍了如何在 MySQL 数据库中存储电话号码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  可能的重复:
                  电话号码和地址的mysql数据类型

                  关于将电话号码存储在数据库中的最佳做法有什么建议吗?考虑一个美国电话号码:

                  Any suggestions on best practice to store telephone numbers in a DB? Consider a US phone number:

                  • 555 555 1212
                  • 555-555-1212
                  • (555) 555 1212
                  • 5555551212
                  • 1-555-555-1212
                  • 1 (555) 555-1212
                  • 等等......

                  我应该删除格式并只存储数字吗?我应该只使用一个字段 - 还是将它们拆分为:国家/地区代码、区号、电话号码等?建议?

                  Should I remove formatting and store only numbers? Should I just use one field -- or split them up into: country code, area code, phone number, etc.? Suggestions?

                  推荐答案

                  • 全部为 varchar(它们不是数字,而是数字集合")
                  • 国家+地区+数量分开
                  • 并非所有国家/地区都有区号(例如我所在的马耳他)
                  • 某些国家/地区在拨打内部电话时会去掉区号的前导零(例如英国)
                  • 客户端代码中的格式
                  • 这篇关于如何在 MySQL 数据库中存储电话号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                    本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Import CSV to Update rows in table(导入 CSV 以更新表中的行)
                  Importing MaxMind#39;s GeoLite2 to MySQL(将 MaxMind 的 GeoLite2 导入 MySQL)
                  How to save a Google maps overlay shape in the database?(如何在数据库中保存谷歌地图叠加形状?)
                  Is there a performance hit using decimal data types (MySQL / Postgres)(使用十进制数据类型(MySQL/Postgres)是否会影响性能)
                  MySQL truncates concatenated result of a GROUP_CONCAT function(MySQL 截断 GROUP_CONCAT 函数的连接结果)
                  What#39;s the difference between VARCHAR(255) and TINYTEXT string types in MySQL?(MySQL 中的 VARCHAR(255) 和 TINYTEXT 字符串类型有什么区别?)
                  <i id='pGukC'><tr id='pGukC'><dt id='pGukC'><q id='pGukC'><span id='pGukC'><b id='pGukC'><form id='pGukC'><ins id='pGukC'></ins><ul id='pGukC'></ul><sub id='pGukC'></sub></form><legend id='pGukC'></legend><bdo id='pGukC'><pre id='pGukC'><center id='pGukC'></center></pre></bdo></b><th id='pGukC'></th></span></q></dt></tr></i><div id='pGukC'><tfoot id='pGukC'></tfoot><dl id='pGukC'><fieldset id='pGukC'></fieldset></dl></div>

                • <legend id='pGukC'><style id='pGukC'><dir id='pGukC'><q id='pGukC'></q></dir></style></legend>

                    <small id='pGukC'></small><noframes id='pGukC'>

                      • <bdo id='pGukC'></bdo><ul id='pGukC'></ul>
                        <tfoot id='pGukC'></tfoot>

                            <tbody id='pGukC'></tbody>