Well in your current example, the from statement can be applied to both tables.
SELECT Customers.CustomerName, Orders.OrderID FROM Customers,Orders WHERE Customers.CustomerID=Orders.CustomerID ORDER BY Customers.CustomerName;
-> Will work as your code
A comma joins two tables.
From just which table you are retrieving data from.
In your example, you joined two tables using a different syntax. it could also be:
SELECT Customers.CustomerName, Orders.OrderID FROM Orders INNER JOIN Customers ON Customers.CustomerID=Orders.CustomerID ORDER BY Customers.CustomerName;
all written code will generate the same results
source share