select Table1.A, Table1.B FROM Table1, Table2 WHERE Table1.B = Table2.B
EXISTS
SELECT * FROM Table1 t1 WHERE EXISTS (SELECT 1 FROM Table2 t2 WHERE t2.B = t1.B)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)