SQL: Goleki Jeneng Lengkap kanggo Propinsi lan Propinsi kanggo AS lan Kanada

amerika utara

Nalika nggarap proyek Google Mapping akhir minggu iki, aku kudu nggawe tabel MySQL sing nerjemahake negara 2 digit lan singkatan negara kanthi jeneng lengkap. Aku yakin iki prekara sing dibutuhake, mula aku wis nyelehake file SQL ing serverku kanggo didownload.

Mangkene pratelan SQL kanggo Singkatan Negara lan Propinsi kanggo Amerika Serikat lan Kanada. Aku uga wis nambahake Indeks ing negara lan id negara kanggo nambah kinerja.

GAMBAR TABEL `negesake` (` COUNTRYID` varchar (2) ORA NULI, `STATEID` varchar (2) ORA NULI, 'FULLNAME` varchar (30) ORA NULI, KUNCI` negara` (`COUNTRYID`), KEY` id` (`STATEID`)) ENGIN = MyISAM DEFAULT CHARSET = utf8 KOMENTAR = 'Goleki Jeneng Lengkap Negara lan Propinsi kanggo AS lan Kanada';
INSERT INTO `states` (` COUNTRYID`, `STATEID`,` FULLNAME`) VALUES ('CA', 'AB', 'Alberta'), ('CA', 'BC', 'British Columbia'), (' CA ',' MB ',' Manitoba '), (' CA ',' NB ',' New Brunswick '), (' CA ',' NL ',' Newfoundland and Labrador '), (' CA ',' NS ',' Nova Scotia '), (' CA ',' NT ',' Northwest Territories '), (' CA ',' NU ',' Nunavut '), (' CA ',' ON ',' Ontario ') , ('CA', 'PE', 'Prince Edward Island'), ('CA', 'QC', 'Quebec'), ('CA', 'SK', 'Saskatachewan'), ('CA', 'YT', 'Yukon'), ('US', 'AK', 'Alaska'), ('US', 'AL', 'Alabama'), ('US', 'AR', 'Arkansas') , ('US', 'AZ', 'Arizona'), ('US', 'CA', 'California'), ('US', 'CO', 'Colorado'), ('US', 'CT ',' Connecticut '), (' US ',' DC ',' District of Columbia '), (' US ',' DE ',' Delaware '), (' US ',' FL ',' Florida ') , ('US', 'GA', 'Georgia'), ('US', 'HI', 'Hawaii'), ('US', 'IA', 'Iowa'), ('US', 'ID ',' Idaho '), (' US ',' IL ',' Illinois '), (' US ',' IN ',' Indiana '), (' US ',' KS ',' Kansas '), ( 'US', 'KY', 'Kentucky'), ('US', 'LA', 'Louisiana'), ('US', 'MA', 'Massachusetts'), ('US', 'MD', 'Mar yland '), (' US ',' ME ',' Maine '), (' US ',' MI ',' Michigan '), (' US ',' MN ',' Minnesota '), (' US ' , 'MO', 'Missouri'), ('US', 'MS', 'Mississippi'), ('US', 'MT', 'Montana'), ('US', 'NC', 'North Carolina '), (' US ',' ND ',' North Dakota '), (' US ',' NE ',' Nebraska '), (' US ',' NH ',' New Hampshire '), (' US ',' NJ ',' New Jersey '), (' US ',' NM ',' New Mexico '), (' US ',' NV ',' Nevada '), (' US ',' NY ', 'New York'), ('US', 'OH', 'Ohio'), ('US', 'OK', 'Oklahoma'), ('US', 'OR', 'Oregon'), (' US ',' PA ',' Pennsylvania '), (' US ',' RI ',' Rhode Island '), (' US ',' SC ',' South Carolina '), (' US ',' SD ' , 'South Dakota'), ('US', 'TN', 'Tennessee'), ('US', 'TX', 'Texas'), ('US', 'UT', 'Utah'), ( 'US', 'VA', 'Virginia'), ('US', 'VI', 'Virgin Islands'), ('US', 'VT', 'Vermont'), ('US', 'WA' , 'Washington'), ('US', 'WI', 'Wisconsin'), ('US', 'WV', 'West Virginia'), ('US', 'WY', 'Wyoming');

Tip topi kanggo Brian sing duwe CSV sing apik Aku bisa kerja saka.

Apa sampeyan mikir?

Situs iki nggunakake Akismet kanggo ngurangi spam. Sinau babagan proses data sampeyan.