If you’ve found this post you are more then likely searching for a quick and easy SQL dump of USA cities and states to add to your project. I do not claim this data to be my own, like you, I was also searching online for a simple SQL dump, only to find pages that took forever to load and dumps that I had to copy and paste, what a pain.
The Goods
states (state, state_code)
cities (city, state_code)
cities_extended (city, state_code, zip, latitude, longitude, county)
This is the extended version of the cities table allowing you to do a lot more cool things with the additional data provided (think google maps, geocoding, distance calculators, etc.)
Download
US Cities and States (880 KB)
{ 6 comments… read them below or add one }
Thanks for sharing with us
all the props – you have save me a great deal of time
Thanks a lot!
thanks you very much,
it was very help full
非常感谢 (Thanks)
thanks a mil. the cities_extended doesnt have a key primary field.. if people need this (should really) here is the code to add it in phpmyadmin etc.
ALTER TABLE cities_extended AUTO_INCREMENT = 0;
ALTER TABLE cities_extended ADD id INT NOT NULL AUTO_INCREMENT KEY;