MySQL Understanding Basic Joins

前端 未结 6 1837
借酒劲吻你
借酒劲吻你 2021-01-06 20:57

I am struggling to understand basic MySQL joins.

Basically I\'ve got 2 tables one with a customer first name and address id in it and another with the actual address.

6条回答
  •  鱼传尺愫
    2021-01-06 21:53

    Assuming that both tables have an address id, you could use

    SELECT firstname, address, from table1 JOIN table2 
    ON table1.addressid = table2.addressid
    

提交回复
热议问题