Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 20 Feb 2004 @ 09:51:16 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Simple question about a left outer join...
 
From:   Henry Runn

Hi,

Those SQL's give different results

sel a.c1,a.c2,a.c3
from tbl1 a left outer join tbl2 b
on a.col1 = b.col1 and b.col1 is null;

=> will give all the rows from table a, because you have only join expression which tells how the join is going to be done and no where clause to filter the rows

sel a.c1,a.c2,a.c3
from tbl1 a left outer join tbl2 b
on a.col1 = b.col1
where b.col1 is null;

=> will give the rows from table a which don't have value in table b because where clause is filtering rows



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023