What would be the best Data Type to use for storing an MSISDN (phone number).
Need to be able to store any phone number in the world.
Does anyone know the maximum possible MSISDN length, including international dialling code?
For example South Africa phone numbers are +27xxxxxxxxx which results in 11 digits excluding the +
The + does not have to be stored.
Thanks in advance
I'd use BIGINT. Please avoid using varchar at all costs. It's a very bad idea to use varchar or char.
Reasons. Varchar/char takes up more space, it's slower to do lookups and cross references and the index is larger too.
When designing tables try and keep them with set row lengths, things will run loads faster. If you have to have some text field it is often best to use char instead of varchar as the overhead cost of varchar is high.
Am working in telecoms for 12 years now designing/optimizing VoIP/SMS platforms. The number one killer when I come in to fix systems is varchars everywhere.
Just my 0.02 worth.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With