select SRCIP_ID,COUNT,IP_NAME from set1 a,set2 b where a.SRCIP_ID=b.SRCIP_ID

解决方案 »

  1.   

    select set1.srcip_id,set1.count,set2.ip_name from set1,set2 where set1.srcip_id=set2.srcip_id;
      

  2.   

    可以这样写:(set1 和set2 若是从其它表中生成的也一样适用。只是要注意补充在两个字符集中互不存在的字段即可)
    select a.srcip_id,a.count,b.ip_name from 
    (select srcip_id,count,'ip_name' as ip_name from set1 ) a ,(select srcip_id,1 as count,ip_name from set2) b
    where a.srcip_id= b.srcip_id
      

  3.   

    select SRCIP_ID,COUNT,IP_NAME from set1 a,set2 b where a.SRCIP_ID=b.SRCIP_ID
    其内容为两个集的并,但顺序不变做不到。