title: Mysql Datatype for US Zip (Postal Codes)
body: <p>I am writing a web application, that is US specific, so the format that other countries use for postal codes are not important. I have a list of us zip codes that i am trying to load into a database table that includes the  </p>
  
  <ul>
  <li>5 digit us zip code</li>
  <li>latitude</li>
  <li>longitude</li>
  <li>usps classification code</li>
  <li>state code</li>
  <li>city</li>
  </ul>
  
  <p>the zip code is the primary key as it is what i will be querying against. i started using a medium int 5 but that truncates the zip codes that have leading zeros.</p>
  
  <p>i considered using a char5 but am concerned about the performance hit of indexing against a char variable.</p>
  
  <p>so my question is what is the best mysql datatype to store zip codes as?</p>
  
  <p>Note: i have seen it in several other questions related to zip codes. I am only interested in US 5 digit zip codes. So there is no need to take other countries postal code formats into consideration.</p>