To compare NULL
values you have to use the IS NULL
predicate, like this:
SELECT table1.*, table2.*
FROM table1
LEFT JOIN table2 ON table1.id=table2.id
WHERE table2.surname IS NULL
To compare NULL
values you have to use the IS NULL
predicate, like this:
SELECT table1.*, table2.*
FROM table1
LEFT JOIN table2 ON table1.id=table2.id
WHERE table2.surname IS NULL