· 8 years ago · May 28, 2018, 03:30 AM
1drop table if exists states;
2create table states
3(
4id smallint not null auto_increment comment 'PK: Unique state ID',
5state varchar(32) not null comment 'State name with first letter capital',
6state_abbr varchar(8) comment 'Optional state abbreviation (US is 2 capital letters)',
7primary key (id)
8);
9
10
11insert into states (state, state_abbr) values
12('Alabama', 'AL'),
13('Alaska', 'AK'),
14('Arizona', 'AZ'),
15('Arkansas', 'AR'),
16('California', 'CA'),
17('Colorado', 'CO'),
18('Connecticut', 'CT'),
19('Delaware', 'DE'),
20('District of Columbia', 'DC'),
21('Florida', 'FL'),
22('Georgia', 'GA'),
23('Hawaii', 'HI'),
24('Idaho', 'ID'),
25('Illinois', 'IL'),
26('Indiana', 'IN'),
27('Iowa', 'IA'),
28('Kansas', 'KS'),
29('Kentucky', 'KY'),
30('Louisiana', 'LA'),
31('Maine', 'ME'),
32('Maryland', 'MD'),
33('Massachusetts', 'MA'),
34('Michigan', 'MI'),
35('Minnesota', 'MN'),
36('Mississippi', 'MS'),
37('Missouri', 'MO'),
38('Montana', 'MT'),
39('Nebraska', 'NE'),
40('Nevada', 'NV'),
41('New Hampshire', 'NH'),
42('New Jersey', 'NJ'),
43('New Mexico', 'NM'),
44('New York', 'NY'),
45('North Carolina', 'NC'),
46('North Dakota', 'ND'),
47('Ohio', 'OH'),
48('Oklahoma', 'OK'),
49('Oregon', 'OR'),
50('Pennsylvania', 'PA'),
51('Rhode Island', 'RI'),
52('South Carolina', 'SC'),
53('South Dakota', 'SD'),
54('Tennessee', 'TN'),
55('Texas', 'TX'),
56('Utah', 'UT'),
57('Vermont', 'VT'),
58('Virginia', 'VA'),
59('Washington', 'WA'),
60('West Virginia', 'WV'),
61('Wisconsin', 'WI'),
62('Wyoming', 'WY')
63;