union 的有关问题

union 的问题a表cu_idcur_namedate1abc20062def20075efg2008b表cur_idcur_namedate1abc20071abc20073def20

union 的问题
a   表
  cu_id   cur_name   date
  1             abc             2006
  2             def             2007
  5               efg           2008
b   表
cur_id     cur_name   date    
1               abc             2007        
1               abc             2007        
3               def             2008        

用a   union     b   时
线保证     b   里边的数据  
也就是   b   里边要是有的话
union   后的结果就是   b   的数据
a   表和表合并后为

1               abc             2007        
1               abc             2007        
3               def             2008    
5               efg           2008



[解决办法]
seelct * from b
union all
select * from a
where not exists (
select 1 from b where
cur_name =a.cur_name
)