我应该存储电话号码字符串或整数? [英] Should I store telephone numbers as strings or integers?
本文介绍了我应该存储电话号码字符串或整数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想存储的电话号码作为字符串
或 INT
的决定。 ?任何想法
I'm trying to decide between storing a phone number as a string
or an int
. Any ideas?
推荐答案
有关诸如此类的任何情况下,想到:我必须计算与任何有价值的东西?如果这没有任何意义,你应该使用的字符串。在这种情况下,还有就是你最好使用电话号码作为一个数字,因此使用字符串没有逻辑的情况下。
For any situation like these, think of : will I have to calculate anything with that value? If that doesn't make any sense, you should use a string. In that case, there's no logical case where you'd use the telephone number as a number, so use a string.
这篇关于我应该存储电话号码字符串或整数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文