Código SQL:
Ver originalCREATE TABLE #table1
(
id INT,
nombre VARCHAR(20),
id_x INT
)
CREATE TABLE #table2
(
id_x INT,
telefono VARCHAR(20)
)
INSERT INTO #table1 VALUES (1 ,'Guillermo' ,4)
INSERT INTO #table1 VALUES (2 ,'Carlos' ,5)
INSERT INTO #table1 VALUES (3 ,'Luis' ,6)
INSERT INTO #table2 VALUES (4 ,'2541667')
INSERT INTO #table2 VALUES (5 ,'9696969')
INSERT INTO #table2 VALUES (NULL ,'987654321')
SELECT t1.* FROM #table1 AS t1
LEFT JOIN #table2 AS t2 ON (t1.id_x=t2.id_x)
WHERE t2.id_x IS NULL
saludos!