6

US Cities and State SQL Dump

US Map

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 }

Yash September 20, 2009 at 8:38 am

Thanks for sharing with us

yep September 30, 2009 at 8:50 pm

all the props – you have save me a great deal of time

Lucianoc January 22, 2010 at 10:10 am

Thanks a lot!

Dinesh samarasekara March 10, 2010 at 3:08 am

thanks you very much,

it was very help full

Rooky April 6, 2010 at 10:38 pm

非常感谢 (Thanks)

huge May 13, 2010 at 2:39 am

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;

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
<pre lang="" line="" escaped="">

Previous post:

Next post: