SQL: Tirohia te Ingoa Katoa mo nga Whenua me nga Rohe mo te US me Canada

raki Amerika

I ahau e mahi ana i tetahi kaupapa Maherehere a Google i enei rangi whakataa, me mahi e au he teepu MySQL i whakamaorihia te whenua mati-2 me te whakapoto kupu ki te ingoa katoa. Ki taku mohio he mea tino hiahiatia tenei, no reira kua tuu e ahau te konae SQL ki taku kaituku hei tango.

Anei te korero a te SQL mo nga Whakataunga a te Kawanatanga me te Rohe mo te United States me Canada. Kua taapirihia e ahau he Tohu mo nga whenua e rua me nga id id kia pai ake ai te mahinga.

KAUPAPA KAUPAPA `states` (` COUNTRYID` varchar (2) KAORE NORE, `STATEID` varchar (2) KAORE NULU, 'FULLNAME` rangatira (`STATEID`)) ENGINE = MyISAM DEFAULT CHARSET = utf30 KOMENTI = 'Tirohia te Ingoa Katoa me te Porowini mo US me Canada';
Whakauru atu ki nga `state` ('COUNTRYID`,` STATEID`, `FULLNAME`) VALUES (' CA ',' AB ',' Alberta '), (' CA ',' BC ',' British Columbia '), (' CA ',' MB ',' Manitoba '), (' CA ',' NB ',' New Brunswick '), (' CA ',' NL ',' Newfoundland me 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');

Potae potae ki Brian i pai tana CSV I taea e au te mahi mai i.

He aha koutou whakaaro?

Whakamahia ai e tenei pae i te Akismet hei whakaiti i te mokowhiti. Akohia te tukatuka o to raraunga korero.