My question is how do you put my zip code 07601 as an integer? I've tried to google several times this question and never got an answer. The reason I'm doing this is to because its important information for something I need to fill out
It boils down to database design esp. choosing data types can affect performance as well - storing zipcodes as integers requires more thoughts ! Eg. non US countries like Canada will have letters in zip code. If you store zip codes as integers, when your company does business in Canada, you will have to change the datatype.
I would select
integer datatype where any sort of arithmetic (Calculations) comes in play. Adding or subtracting zipcodes is of no value !
Also, US zipcodes have leading zeroes e.g. 08874. For integers, a leading zero is of no value.
I would suggest you store zipcode as
varchar(10) and if all your zipcodes are numbers, you can use
convert to fill whatever you are filling out.
From msdn :
Character fields can store text information that is not used in mathematical calculations, such as names, addresses, and numbers. For example, phone numbers or zip codes, though they include mostly numbers, are actually best stored as character values.