Topic starter 13/07/2021 12:55 pm
I'm working on a homework project and I'm supposed to perform a database query that finds flights either by the city name or the airport code, but the flights
table only contains the airport codes so if I want to search by city I have to join on the airports
table.
13/07/2021 4:00 pm
You can do INNER JOIN on multiple columns in SQL as shown below:
SELECT * FROM flights INNER JOIN airports ON ((airports.code = flights.fairport) AND (airports.code = flights.tairport))
Neha liked