Para comparar NULL
valores tienes que usar el IS NULL
predicado, así:
SELECT table1.*, table2.*
FROM table1
LEFT JOIN table2 ON table1.id=table2.id
WHERE table2.surname IS NULL
Para comparar NULL
valores tienes que usar el IS NULL
predicado, así:
SELECT table1.*, table2.*
FROM table1
LEFT JOIN table2 ON table1.id=table2.id
WHERE table2.surname IS NULL