Very Useful US State Names and Abbreviations Database
cashvolume
Here is a very useful mysql database that includes U.S. state names with their abbreviations you can download it in plain text here. Just load up phpMyAdmin and import it into a new database. I found this very useful for making dating/personals websites without having to manually enter all the state names into individual tables. Here is how the database is setup:
#State names and abbreviations mysql database
#http://www.cashvolume.com
#
drop table if exists state;
create table state
(
state_id smallint unsigned not null auto_increment comment ‘Unique state ID’,
state varchar(32) not null comment ‘State name’,
state_abbr varchar(8) comment ‘State abbreviation’,
primary key (state_id)
);
insert into state
values
(NULL, ‘Alabama’, ‘AL’),
(NULL, ‘Alaska’, ‘AK’),
(NULL, ‘Arizona’, ‘AZ’),
(NULL, ‘Arkansas’, ‘AR’),
(NULL, ‘California’, ‘CA’),
(NULL, ‘Colorado’, ‘CO’),
(NULL, ‘Connecticut’, ‘CT’),
(NULL, ‘Delaware’, ‘DE’),
(NULL, ‘District of Columbia’, ‘DC’),
(NULL, ‘Florida’, ‘FL’),
(NULL, ‘Georgia’, ‘GA’),
(NULL, ‘Hawaii’, ‘HI’),
(NULL, ‘Idaho’, ‘ID’),
(NULL, ‘Illinois’, ‘IL’),
(NULL, ‘Indiana’, ‘IN’),
(NULL, ‘Iowa’, ‘IA’),
(NULL, ‘Kansas’, ‘KS’),
(NULL, ‘Kentucky’, ‘KY’),
(NULL, ‘Louisiana’, ‘LA’),
(NULL, ‘Maine’, ‘ME’),
(NULL, ‘Maryland’, ‘MD’),
(NULL, ‘Massachusetts’, ‘MA’),
(NULL, ‘Michigan’, ‘MI’),
(NULL, ‘Minnesota’, ‘MN’),
(NULL, ‘Mississippi’, ‘MS’),
(NULL, ‘Missouri’, ‘MO’),
(NULL, ‘Montana’, ‘MT’),
(NULL, ‘Nebraska’, ‘NE’),
(NULL, ‘Nevada’, ‘NV’),
(NULL, ‘New Hampshire’, ‘NH’),
(NULL, ‘New Jersey’, ‘NJ’),
(NULL, ‘New Mexico’, ‘NM’),
(NULL, ‘New York’, ‘NY’),
(NULL, ‘North Carolina’, ‘NC’),
(NULL, ‘North Dakota’, ‘ND’),
(NULL, ‘Ohio’, ‘OH’),
(NULL, ‘Oklahoma’, ‘OK’),
(NULL, ‘Oregon’, ‘OR’),
(NULL, ‘Pennsylvania’, ‘PA’),
(NULL, ‘Rhode Island’, ‘RI’),
(NULL, ‘South Carolina’, ‘SC’),
(NULL, ‘South Dakota’, ‘SD’),
(NULL, ‘Tennessee’, ‘TN’),
(NULL, ‘Texas’, ‘TX’),
(NULL, ‘Utah’, ‘UT’),
(NULL, ‘Vermont’, ‘VT’),
(NULL, ‘Virginia’, ‘VA’),
(NULL, ‘Washington’, ‘WA’),
(NULL, ‘West Virginia’, ‘WV’),
(NULL, ‘Wisconsin’, ‘WI’),
(NULL, ‘Wyoming’, ‘WY’)
;
Posted in mySQL |










