473,408 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

telephone number column type

What is the recommended way of storing 10 digit phone numbers? I like
bigint(10), but it seems most are using varchar? Or I've also seen 2
int columns, one for area code and another for the rest of the digits?

I wish phone numbers had their own column type, so I can send
123-456-7890 or (123) 456-7890 or whatever and have mysql do the right
thing.
Jul 19 '05 #1
2 12037
chris wrote:
What is the recommended way of storing 10 digit phone numbers? I like
bigint(10), but it seems most are using varchar? Or I've also seen 2
int columns, one for area code and another for the rest of the digits?

I wish phone numbers had their own column type, so I can send
123-456-7890 or (123) 456-7890 or whatever and have mysql do the right
thing.


I would recommend using varchar. Then it should be quite easy to put the
data in the format you like, and read it out in the same format you put
it in.

Jul 19 '05 #2
chris wrote:
What is the recommended way of storing 10 digit phone numbers? I like
bigint(10), but it seems most are using varchar? Or I've also seen 2
int columns, one for area code and another for the rest of the digits?

I wish phone numbers had their own column type, so I can send
123-456-7890 or (123) 456-7890 or whatever and have mysql do the right
thing.


I would recommend using varchar. Then it should be quite easy to put the
data in the format you like, and read it out in the same format you put
it in.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ashish | last post by:
I wanted to make a Java application which would dial a telephone number using the modem. When the person on the other end lifts up the telephone (answers the phone), the application should start...
0
by: chris | last post by:
What is the recommended way of storing 10 digit phone numbers? I like bigint(10), but it seems most are using varchar? Or I've also seen 2 int columns, one for area code and another for the rest...
4
by: Iftikhar Hussain | last post by:
Hello Everyone Nice to be back here, well all u guys have helped in past & now I would like a favor again. first what i want to develop is as follows: An application for rescue station, where...
4
by: Richard | last post by:
When i try sorting in the database, it sorts the numbers: 0 1 102 2 304 305 4 etc....
3
by: Larry Rekow | last post by:
I've built various web apps using Frontpage and/or ASP and Access, but now I'm trying to figure a way to do the following, perhaps in ASP.Net My friend gets parts lists in invoices (they are in...
1
by: Ed Dror | last post by:
Hi there, I have Access database with telephone column and When I created a webform data grid With VWD 2005 this column show like this 5552223333 how do I format it like (555)222-3333 ...
1
by: Robert Johnson | last post by:
Hi all. I need to format my text box's and combo box's with Telephone (###) ###-#### and Postal Code #####-#### or other custom formating, how do I do this? I tried to go into Properties,...
9
by: =?Utf-8?B?TWlrZTk5MDA=?= | last post by:
I save a number in the table and want to get that number again, but the number I get has lower precision than I expect. For example, when I divide 10/3 I get 3.3333333333333335 if the variable is...
1
by: silent15 | last post by:
I am having a bit of trouble writing a function for a telephone directory. I need to create a program that upon prompt of first and last name it needs to output the corresponding number from a dat...
0
by: tlontz | last post by:
I am trying to retrieve the telephone_number from active directory using the following script: Dim search As New DirectorySearcher("") search.Filter =...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.