I have three tables
Table1 == City
ID -- Name -- CountryCode -- District -- Population
Table2 == Country
Code -- Name --n[3] -- ... -- n[13] -- Captial
Table3 == CountryLanguage
CountryCode -- Language
City.CountryCode equals Country.Code
Country.Capital equals City.ID
City.CountryCode && Country.Code equals CountryLanguage.CountryCode
I'm having difficulties understanding whats going wrong with my join statements or if I'm using it right at all.
I'm trying to produce a ResultSet that allows me to replace CountryCode from City with Name from Country ect. in a webpage generated by a
servlet.
I'm using SELECT * FROM City JOIN Country ON City.CountryCode=Country.Code WHERE City.Name=SomeVariableName
Am I using this correctly if so how do I access Country.Name calling rs.getString("Country.Name")? Also my result set is limited to the same 5 columns already in City.
So lost and banging my head against the keyboard doesn't seem to be producing results. Any help is greatly appreciated.
P.S. I also need to pull Language where country code matches