I have two tables with multiple connections, for example:
First table: Tbl_Flights, it has fields City_From and City_To, containing city’s key.
Also, there is a table called Tbl_Cities, which has unique counter field and field for city name.
How to create a query which will possible to print out all the flights from table Tbl_Flights with departure and arrival city names, like:
From To
------------------------------
Moscow New York
Amsterdam Paris
Helsinki Tallin
Does double INNER JOIN solve the problem?
Yes, it does. But they are two
INNER JOINs to the same tableCities, so that you can select theCiteNamecolumn into two different columnsFrom,to.Like so:
SQL Fiddle Demo
This will give you: