I have a question regarding left join on SQL: I would like to know how SQL servers perform left join?
Let's say I have two tables.
PEOPLE
- id
- name
PHONE
- id
- person_id
- phone
When I execute:
select name, phone
from people
left join phone on people.id = phone.person_id
...I would like to know how SQL servers process the query string.
My guess is:
- select all rows of people
- start matching phone rows with on condition. In this case, people.id = phone_person_id.
- display 'phone' value as null if not found since it is left join.
Am I correct??
In addition, what books should I read to get this kind of information?