I have 2 tables: Order and Customer. Order has a foreign key from Customer:
I can join them in 2 different ways:
First way
Select *
from [Order]
join Customer
on [Order].Customer_id = Customer.id;
Second way
Select *
from [Order],Customer
where [Order].Customer_id = Customer.id;
The 2 queries return the same result set which leads me to my related questions:
- Which query is the better of the two?
- Is there a difference between them involving time execution?
- Why is it that when I search join examples all of them are using the first way?
- I learned the second type of query in college - is it wrong to use?