Skip to content

Instantly share code, notes, and snippets.

@donniebrandt
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save donniebrandt/1dc95b164bb6204b46a9 to your computer and use it in GitHub Desktop.

Select an option

Save donniebrandt/1dc95b164bb6204b46a9 to your computer and use it in GitHub Desktop.
MySQL: States.
CREATE TABLE `states` (
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`abbreviation` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
`country` enum('United States','Canada') COLLATE utf8_unicode_ci NOT NULL,
`region` enum('South','West','Northeast','Midwest') COLLATE utf8_unicode_ci NOT NULL,
`division` enum('East South Central','East North Central','West South Central','West North Central','New England','Pacific','Mountain','Middle Atlantic','South Atlantic') COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`name`,`country`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `states` (`name`, `abbreviation`, `country`, `region`, `division`)
VALUES
('', '', '', '', ''),
('Alabama', 'AL', 'United States', 'South', 'East South Central'),
('Alaska', 'AK', 'United States', 'West', 'Pacific'),
('Alberta', 'AB', 'Canada', '', ''),
('American Somoa', 'AS', 'United States', '', ''),
('Arizona', 'AZ', 'United States', 'West', 'Mountain'),
('Arkansas', 'AR', 'United States', 'South', 'West South Central'),
('British Columbia', 'BC', 'Canada', '', ''),
('California', 'CA', 'United States', 'West', 'Pacific'),
('Colorado', 'CO', 'United States', 'West', 'Mountain'),
('Connecticut', 'CT', 'United States', 'Northeast', 'New England'),
('Delaware', 'DE', 'United States', 'South', 'South Atlantic'),
('District of Columbia', 'DC', 'United States', 'South', 'South Atlantic'),
('Florida', 'FL', 'United States', 'South', 'South Atlantic'),
('Georgia', 'GA', 'United States', 'South', 'South Atlantic'),
('Guam', 'GU', 'United States', '', ''),
('Hawaii', 'HI', 'United States', 'West', 'Pacific'),
('Idaho', 'ID', 'United States', 'West', 'Mountain'),
('Illinois', 'IL', 'United States', 'Midwest', 'East North Central'),
('Indiana', 'IN', 'United States', 'Midwest', 'East North Central'),
('Iowa', 'IA', 'United States', 'Midwest', 'West North Central'),
('Kansas', 'KS', 'United States', 'Midwest', 'West North Central'),
('Kentucky', 'KY', 'United States', 'South', 'East South Central'),
('Louisiana', 'LA', 'United States', 'South', 'West South Central'),
('Maine', 'ME', 'United States', 'Northeast', 'New England'),
('Manitoba', 'MB', 'Canada', '', ''),
('Maryland', 'MD', 'United States', 'South', 'South Atlantic'),
('Massachusetts', 'MA', 'United States', 'Northeast', 'New England'),
('Michigan', 'MI', 'United States', 'Midwest', 'East North Central'),
('Minnesota', 'MN', 'United States', 'Midwest', 'West North Central'),
('Mississippi', 'MS', 'United States', 'South', 'East South Central'),
('Missouri', 'MO', 'United States', 'Midwest', 'West North Central'),
('Montana', 'MT', 'United States', 'West', 'Mountain'),
('Nebraska', 'NE', 'United States', 'Midwest', 'West North Central'),
('Nevada', 'NV', 'United States', 'West', 'Mountain'),
('New Brunswick', 'NB', 'Canada', '', ''),
('New Hampshire', 'NH', 'United States', 'Northeast', 'Middle Atlantic'),
('New Jersey', 'NJ', 'United States', 'Northeast', 'Middle Atlantic'),
('New Mexico', 'NM', 'United States', 'West', 'Mountain'),
('New York', 'NY', 'United States', 'Northeast', 'Middle Atlantic'),
('Newfoundland', 'NL', 'Canada', '', ''),
('North Carolina', 'NC', 'United States', 'South', 'South Atlantic'),
('North Dakota', 'ND', 'United States', 'Midwest', 'West North Central'),
('Northwest Territorites', 'NT', 'Canada', '', ''),
('Nova Scotia', 'NS', 'Canada', '', ''),
('Nunavut', 'NU', 'Canada', '', ''),
('Ohio', 'OH', 'United States', 'Midwest', 'East North Central'),
('Oklahoma', 'OK', 'United States', 'South', 'West South Central'),
('Ontario', 'ON', 'Canada', '', ''),
('Oregon', 'OR', 'United States', 'West', 'Pacific'),
('Other', '', '', '', ''),
('Pennsylvania', 'PA', 'United States', 'Northeast', 'Middle Atlantic'),
('Prince Edward Island', 'PE', 'Canada', '', ''),
('Puerto Rico', 'PR', 'United States', '', ''),
('Quebec', 'QC', 'Canada', '', ''),
('Rhode Island', 'RI', 'United States', 'Northeast', 'New England'),
('Saskatchewan', 'SK', 'Canada', '', ''),
('South Carolina', 'SC', 'United States', 'South', 'South Atlantic'),
('South Dakota', 'SD', 'United States', 'Midwest', 'West North Central'),
('Tennessee', 'TN', 'United States', 'South', 'East South Central'),
('Texas', 'TX', 'United States', 'South', 'West South Central'),
('Utah', 'UT', 'United States', 'West', 'Mountain'),
('Vermont', 'VT', 'United States', 'Northeast', 'New England'),
('Virginia', 'VA', 'United States', 'South', 'South Atlantic'),
('Washington', 'WA', 'United States', 'West', 'Pacific'),
('West Virginia', 'WV', 'United States', 'South', 'South Atlantic'),
('Wisconsin', 'WI', 'United States', 'Midwest', 'East North Central'),
('Wyoming', 'WY', 'United States', 'West', 'Mountain'),
('Yukon Territory', 'YT', 'Canada', '', '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment