赚分来了!
实现两个表的连接,并且保留左边的表未通过连接的内容
例如:
table1
f1    f2   f3
1     a     a
2     c      c
3     b     b
table2
f1    f22   f33
1     d     d
2     e     e
select a.f1,a.f2,a.f3,b.f22,b.f33 from table1 left out join table2 on (table1.f1=table2.f1)
返回的结果为
f1    f2   f3     f22     f33
1     a     a     d        d
2     c      c    e        e
3     b     b    null     null