We Recommend

SQL Cookbook SQL Cookbook
Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.


Posted By

tclancy on 04/09/08


Tagged

mysql db zipcodes


Versions (?)


MySQL Zip Code Table Structure


Published in: SQL 


  1. CREATE TABLE /*!32312 IF NOT EXISTS*/ `raw_zips` (
  2. `detail_cd` char(5) DEFAULT NULL,
  3. `zip_code` varchar(10) NOT NULL,
  4. `city_st_key` varchar(20) DEFAULT NULL,
  5. `zip_class` char(5) DEFAULT NULL,
  6. `city_st_name` varchar(200) DEFAULT NULL,
  7. `city_abbreviation` varchar(50) DEFAULT NULL,
  8. `fac_cd` char(5) DEFAULT NULL,
  9. `mail_name` varchar(50) DEFAULT NULL,
  10. `ll_city_key` varchar(20) DEFAULT NULL,
  11. `ll_city` varchar(200) DEFAULT NULL,
  12. `city_delv` char(5) DEFAULT NULL,
  13. `crrt_mail` char(5) DEFAULT NULL,
  14. `unique_zip` varchar(10) DEFAULT NULL,
  15. `fin_no` varchar(10) DEFAULT NULL,
  16. `state` char(3) DEFAULT NULL,
  17. `fips` tinyint(3) UNSIGNED DEFAULT NULL,
  18. `county` varchar(200) DEFAULT NULL,
  19. `latitude` double DEFAULT NULL,
  20. `longitude` double DEFAULT NULL,
  21. `area_code` varchar(3) DEFAULT NULL,
  22. `t_z` tinyint(4) DEFAULT NULL,
  23. `elevation` int(11) DEFAULT NULL,
  24. `perns_hous` varchar(50) DEFAULT NULL,
  25. `population_2000` double UNSIGNED DEFAULT NULL,
  26. `area_square_miles` double UNSIGNED DEFAULT NULL,
  27. `households` int(10) UNSIGNED DEFAULT NULL,
  28. `white` int(10) UNSIGNED DEFAULT NULL,
  29. `black` int(10) UNSIGNED DEFAULT NULL,
  30. `hispanic` int(10) UNSIGNED DEFAULT NULL,
  31. `household_income` double UNSIGNED DEFAULT NULL,
  32. `house_value` varchar(50) DEFAULT NULL,
  33. KEY `zip_code` (`zip_code`)
  34. ) TYPE=InnoDB /*!40100 DEFAULT CHARSET=latin1*/;

Report this snippet 

You need to login to post a comment.