我有两个表, t1 和 t2.
t1有字段为
id name
----------
1 wo
2 ni
3 ta
t2有字段如下,其中t1_id是外键,对应t1表中的id。
id    t1_id    desc
------------------
1     1          hhh
2     3          ddddd现在我先通过联合查询查出t1.id, t1.name, t2.desc, 使用的sql如下:
select a.id, a.name, b.desc from t1 a, t2 b where a.id=b.t1_id但是只能查出如下的结果:
id    name    desc
----------------------
1     wo        hhh
3     ta          dddddd
其中t1表中id为2的记录没有显示出来。
请问我如何才能保证这样的查询中t1表中所有的记录都能够查出来,并使用默认值。
SQL联合