How to find the common values from two different tables having a common column

You can do an inner join on the city column, to find values that exist in both tables.

    -- Output the city from either table (since it will be the same) 
    -- Join table1 and table2 together, on a matching city column
    table1 t1 join table2 t2 on (
group by 
    -- Only return a single row per city

Browse More Popular Posts

Leave a Comment