Let me explain with an example. There is a query:
SELECT T1.num, T2.id FROM T1 INNER JOIN T2 on (T1.prop1 = T2.prop1) and (T1.prop2 = T2.prop2) ........................ and (T1.propN = T2.propN)
if all the fields prop1 ... propN are not NULL, then the query pulls out the necessary data, i.e. takes all the lines from which all the prop fields match.
but if in the fields prop1 ... propN there are NULL values, such strings are truncated, as I understand it. NULL = NULL gives UNKNOWN and they do not join.
How to get around this? What would be lines with properties, for example
prop1 prop2 prop3
T1: 45 NULL 67
T2: 45 NULL 67
have joined.
Ps.: Thanks in advance!
LEFT JOIN
or thereRIGHT JOIN
do not work or what? - Barmaley