更新时间:2022-11-30 16:31:28
您的表名有些混乱.是X和Y,还是X.a和Y.b?
Your table names are a little confusing. Is it X and Y, or X.a and Y.b?
如果X和Y:
SELECT X.a1, X.a2, Y.a1, Y.b2 FROM X LEFT OUTER JOIN Y ON (X.a1 = Y.b1)
应带回所有X,对于没有匹配记录的Y.a1和Y.b2为空.
should bring back all X, with nulls for the Y.a1 and Y.b2 where there is no matching record.