select isnull(a.姓名,b.姓名)
from a full join b
on a.姓名=b.姓名
where a.姓名 not in 
(select a.姓名
from a,b
where a.姓名=b.姓名)

解决方案 »

  1.   

    select a.姓名
    from a,b
    where a.姓名=b.姓名
      

  2.   

    select a.姓名
    from a,b
    where a.姓名=b.姓名
      

  3.   

    select 姓名 from a where not exists(select 1 from b where 姓名=a.姓名)
    union
    select 姓名 from b where not exists(select 1 from a where 姓名=b.姓名)
      

  4.   

    你要想显示a ,b 表相同的姓名。select a.姓名,b.姓名 from a join b on  a.姓名=b.姓名
      

  5.   

    select a.姓名
    from a
    where a.姓名 not in (select b.姓名 from b)---
    选择所有a表中有而b表中没有的姓名select b.姓名
    from b
    where b.姓名 not in (select a.姓名 from a)
    ---
    选择所有b表中有而a表中没有的姓名