I am a newbie to SQL. I was going through the join tutorial on W3Schools and using the example database. I can’t seem to join three tables. I can join Orders and Employees and Orders and Customers, but not all three. What is the “operator” that I am missing? Thanks.
SELECT Orders.OrderID, EMPLOYEES.EMPLOYEEID,EMPLOYEES.LASTNAME,CUSTOMERS.CUSTOMERNAME,EMPLOYEES.LASTNAMEFROM ORDERSINNER JOIN EMPLOYEESON EMPLOYEES.EMPLOYEEID=ORDERS.EMPLOYEEIDINNER JOIN CUSTOMERSON CUSTOMERS.CUSTOMERID=ORDERS.CUSTOMERID;
Syntax error (missing operator) in query expression 'EMPLOYEES.EMPLOYEEID=ORDERS.EMPLOYEEID INNER JOIN CUSTOMERS ON CUSTOMERS.CUSTOMERID=ORDERS.CUSTOMERID'.