SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySql INSERTS for U.S. States

    Hi,

    I need a hand with this. Does any one have the U.S. State Codes lying around somewhere on a database ?
    I want to insert them into my database. My present database has numberical ids - which is not what I want.

    Can someone post MySQL insert statements into this thread ?
    I want something looking like this

    INSERT INTO state VALUES (AL, 'Alabama');
    INSERT INTO state VALUES (AZ, 'Arizona');
    INSERT INTO state VALUES (CA, 'California');

    I know you get the picture. - I'm sure others will benefit too.

    Thanks
    Last edited by marcel; Sep 30, 2002 at 08:26.

  2. #2
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MySql INSERTS for U.S. States

    Is it really so hard to go to Google, find a list of states, and do a "search and replace" to replace the HTML around it with SQL syntax?
    ----Adopt-a-Sig----
    Your message here!

  3. #3
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NO it does not sound that difficult. But not everyone uses state codes, some use the actual state name.

    I'm sure someone has those STATE codes in a database somewhere.

    Thanks in advance to the kind person who can provide those INSERT statements.

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •