SQL: Nānā inoa piha no nā mokuʻāina a me nā panalāʻau no ka US a me Kanada

ma ka'ākau'ākau

ʻOiai e hana ana i kahi papahana Google Mapa i kēia hopena pule, pono wau e hana i kahi papa i MySQL i unuhi i ka ʻāina helu ʻelua a hoʻopōkole i ka inoa i kahi inoa piha. Manaʻo wau he mea kēia e pono ai, no laila ua kau wau i ka faila SQL ma kaʻu kikowaena no ka hoʻoiho.

Eia ka ʻōlelo SQL no nā mokuʻāina a me nā mokuʻāina ʻo ʻAmelika Hui Pū ʻIa a me Kanada. Ua hoʻohui pū wau i kahi papa kuhikuhi ma nā ʻāina ʻelua a me nā id id no ka hoʻomaikaʻi ʻana i ka hana.

CREATE TABLE `states` (` COUNTRYID` varchar (2) Aʻole NUL, 'STATEID` varchar (2) Aʻole NULA,' FULLNAME` varchar (30) ʻAʻole NULA, KEY ʻĀina` (`COUNTRYID`), KEY` id` (`STATEID`)) INGINI = MyISAM DEFAULT CHARSET = utf8 KOMENTARI = 'Nānā ʻia ka inoa piha o ka mokuʻāina a me ka panalāʻau no US a me Kanada';
Hoʻokomo i loko `nā mokuʻāina` (` COUNTRYID`, `STATEID`,` FULLNAME`) NĀ KĀNĀWAI ('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 ',' Ilinoi '), (' 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' , 'Wakinekona'), ('US', 'WI', 'Wisconsin'), ('US', 'WV', 'West Virginia'), ('US', 'WY', 'Wyoming');

Pihi pāpale i ʻO Brian i loaʻa iā CSV maikaʻi Ua hiki iaʻu ke hana mai.

Pehea kou manaʻo?

Ke hoʻohana nei kēia pūnaewele i ka Akismet e ho'ēmi i ka spam. E aʻo pehea e hanaʻia ai kāuʻikeʻikepili.