SELECT R.a1, R.a2, S.b1, S.b2 FROM R LEFT JOIN S ON R.a2=S.b1