left outer join

  table   A:  
Field_K,   Field_A  
  1                       a  
  3                       b  
  4                       c  
   
  table   B:  
  Field_K,   Field_B  
  1                       x  
  2                       y  
  4                       z  
   
  select   a.Field_K,   a.Field_A,   b.Field_K,   b.Field_B  
  from   a   left  outer join   b   on   a.Field_K=b.Field_K  
   
  Field_K         Field_A         Field_K         Field_B          
  ----------   ----------   ----------   ----------    
  1                     a                     1                     x                    
  3                     b                     NULL               NULL  
  4                     c                     4                     z                    
   

posted on 2014-08-27 15:42  a_badegg  阅读(162)  评论(0编辑  收藏  举报

导航