I don't understand quite how do some parts of the 'join' work.
I have 2 tables that I need to join on some columns.
Lets say the following relations:
TabA ( IDA, IDB, Label, isActive)
TabB (IDB, INFORMATION)
Here we join them on IDB
. But what if we want to join onisActive = 1
?
What will happen?
Select *
from TabA
left join TabB
on TabA.IDB = TabB.IDB
and isActive = 1
I get some kind of cartesian product but I don't understand why nor what logic?