Search code examples
mysqljoinleft-joinright-join

How to join two tables using mysql


It's been so long since I did any Mysql queries I forgot how to do basic joins. I have two tables:

Orders_ and Members

I need to create one view which displays all the orders with the associated Email and Member_Id.

https://i.sstatic.net/VdaQ7.png <-- Tables


Solution

  • I would refer to the MySQL reference

    SELECT * 
        FROM Orders 
        INNER JOIN Members
            ON Orders.coordinateList_Id = Members.Members_Member