World countries and their standard codes are listed in ISO 3166-1. States (whatever are they called in different countries ("lands" in Germany, "federation subjects" in Russia etc.)) of the countries and their codes are defined in ISO 3166-2. But I couldn't find anything like this for cities.
What I need is a table listing of world cities where it would be also shown in what particular state are they situated and the state would be designated by an ISO 3166-2 code.
I have managed to find such a table listing USA cities (here) but I also need other countries data.