select 身份证,姓名 from table1
union
select 身份证,姓名 from table2

解决方案 »

  1.   

    select 身份证,姓名 
    from select 身份证,姓名 from table1
         union
         select 身份证,姓名 from table2
    order by 身份证
    这样的话,相同的身份证号就在一起了,对吧?
      

  2.   

    select 身份证,姓名 from table1 
    union
    select 身份证,姓名 from table2 order by 身份证
    你说得没错 
      

  3.   

    select 身份证,姓名 from table1
    union
    select 身份证,姓名 from table2