如何合并两个表的相同列?
f1,f2,f3为字段名
表1为:                  表2为:       
f1  f2                  f1  f3
a  12                   e   12
b  5                    d   21
e  8                    z   7
g  23                   c   5
表1表2合并为表3,合并f1字段
f1   f2   f3
a    12   0
b     5   0
c     0   5
d     0   21
e     8   12
g    23   0
z    0    7
------解决方案--------------------
SQL code
select isnull(a.f1,b.f1) as f1,isnull(a.f2,0) as f2,isnull(b.f3,0) as f3
from tb1 a full join tb2 b on a.f1 = b.f1