test1 id,a, b, c 
test2 id,d, e, f
SELECT *
FROM test1 FULL JOIN
      test2 ON test1.id = test2.id返回后结果:
test1.id    a    b    c    tst2.id    d    e    f
001         na   ww   cc     001      dd   ss    ff
002         11   22   33     002      33   11    22
null        null null null   004      as   vv    vv
null        null null null   005      da   aa    sss    
008         000  233   ass   null     null null  null
009         aaa  sss   ddd   null     null null  null 
010         aaa  cc    ddd   010      sddd ddd   sss-==============问 :如何将结果行中 null的行压缩掉?让上述结果变成:
test1.id    a    b    c    tst2.id    d    e    f
001         na   ww   cc     001      dd   ss    ff
002         11   22   33     002      33   11    22
008         000  233   ass   004      as   vv    vv
009         aaa  sss   ddd   005      da   aa    sss    
010         aaa  cc    ddd   010      sddd ddd   sss

解决方案 »

  1.   

    select * from (
    SELECT *
    FROM test1 FULL JOIN
          test2 ON test1.id = test2.id ) g
    where g.a is not null and g.b is not null and g.c is not null and g.d is not null
    and g.e is not null and g.f is not null
      

  2.   

    其它的办法就是建视图了 ,然后加上 is not null 这个条件
    直接
    select * from 视图^_^
      

  3.   

    select * from test1 a,test2 b where a.id=b.id and a.id is not null and b.id is not null and a.a is not null and a.b is not null and a.c is not null and b.a is not null and b.b is not null and b.c is not null
      

  4.   

    sql server 里 估计这些 语句没有问题,,那么 access呢?
      

  5.   

    test1.id    a    b    c    tst2.id    d    e    f
    001         na   ww   cc     001      dd   ss    ff
    002         11   22   33     002      33   11    22
    008         000  233   ass   004      as   vv    vv
    009         aaa  sss   ddd   005      da   aa    sss    
    010         aaa  cc    ddd   010      sddd ddd   sss第三行test1.id是008,test2.id怎么是004了,这就不test.id=test2.id了啊
      

  6.   

    严重同意
    dreamover(梦醒了)