The question might be very simple, but I don’t understand how the null values behave in an mysql syntax. Suppose I have this prepared request :
select t1.*
from table1 t1
left join table2 t2
on t1.id = t2.id
and some_entry = :value
where t2.the_id is null
some_entry is a table2 entry, t2.the_id is the incremental index of table2. What will be the output if table2 is empty ?
Even if
table2is empty, it will still display all records ontable1because you have usedLEFT JOIN.