How to join two tables using mysql

47 Views Asked by At

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.stack.imgur.com/VdaQ7.png <-- Tables

2

There are 2 best solutions below

0
On BEST ANSWER

I would refer to the MySQL reference

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

The query, based on your image, should look like so:

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