Re: int or char for area code and phone number

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 13:44:10 -0500

Personally, I would just use CHAR; you won't be doing any calculation on the
data (SUM/AVG/arithmetic/etc). It's for display only. So you'll need to
eventually convert it to a string anyway. There is no reason I can think of
to store it as an integer. What are your arguments for the integer (or your
boss', if that's his position)?

-- 
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"ChrisR" <bla@noemail.com> wrote in message
news:emiinJM0EHA.1452@TK2MSFTNGP11.phx.gbl...
> Our table is currently using char for the area code and phone numbers. My
> boss and I were having a debate about using int or char for these type of
> columns. What are the pros/ cons to using both types of data for these?
>
> --
> SQL2K SP3
>
> TIA, ChrisR
>
>


Relevant Pages

  • Re: int or char for area code and phone number
    ... My first arguement is that I dont want character data in there. ... I would just use CHAR; you won't be doing any calculation on ... >> boss and I were having a debate about using int or char for these type ...
    (microsoft.public.sqlserver.server)
  • Re: Smart char * class...
    ... Victor Bazarov spoke thus: ... My boss doesn't like them, and all the code expects char *'s, and none ...
    (comp.lang.cpp)
  • Re: int or char for area code and phone number
    ... > Our table is currently using char for the area code and phone numbers. ... > boss and I were having a debate about using int or char for these type of ...
    (microsoft.public.sqlserver.server)
  • int or char for area code and phone number
    ... Our table is currently using char for the area code and phone numbers. ... boss and I were having a debate about using int or char for these type of ...
    (microsoft.public.sqlserver.server)
  • [PATCH 2/2] display: Driver ks0108 and cfag12864b
    ... Adds support for additional "display" devices, ... +static const unsigned int FirstMinor = 0; ... +void cfag12864b_E(unsigned char _State) ... +void cfag12864b_CS1 ...
    (Linux-Kernel)