I am confused about the execution order of SQL queries.
For example, (Inner join
in MySQL
in the code below), between WHERE
clause and SELECT * FROM
clause, which one gets to be interpreted and executed first?
That is to say, does the query below bring *
(all) of the tables data
first then find the cases that match with WHERE
condition? or Do they just find the list of data
that match with WHERE
condition and then SELECT * FROM
from the WHERE
result?
SELECT * FROM customers, orders
WHERE customers.id = orders.customer_id;
As above case, I am wondering how the SQL queries are executed in general.