I have two tables:
Customers(Id, Name, TownId) T
Towns(Id, Name)
I have an SQL statement like this:
SELECT *
FROM Customers
INNER JOIN Towns ON Towns.Id = Customers.TownId
WHERE Customers.Id > 5
What would happen first?
Would it filter the Customers
table and then join the selected records with Towns
table?
Would it join all Customers
with Towns
and then filter? Or is it that you cannot tell?