Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 DataTypes for these columns

Author  Topic 

dbwilson4
Yak Posting Veteran

50 Posts

Posted - 2007-06-13 : 21:58:34
I'm designing a business networking web applications and could someone suggest what the best datatypes are for these columns and why?

zipcode - i made this varchar
stateid - i normalized this so it's int

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-13 : 22:11:22
Do you use 5-digit or 5 + 4 zip code?
Go to Top of Page

dbwilson4
Yak Posting Veteran

50 Posts

Posted - 2007-06-13 : 22:36:16
i don't know the standard..i just use the 5 digit one....not sure what I SHOULD be using. It's a social networking site type of app for business members.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-13 : 23:39:24
I'll use char(5) for 5-digit zip code.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-14 : 09:17:19
<<
zipcode - i made this varchar
>>

If the length is fixed then use CHAR, otherwise use VARCHAR datatype

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -