Posted by: techGuy April 20, 2008
sql question
Login in to Rate this Post:     0       ?        

well,
Leader might be wrong , since it will only list out name of cats.
Another way (just to simplify m$hacks query)
select name from (
                  -- will give you all the cat names with color=brown 
                 (select name from cat c, animal a where a.color='brown' and a.id=c.id)                
    
                 union
                -- will give you all the dog names with color=brown
                  ( select name from dog d, animal a where a.color='brown' and a.id=d.id)
                 )
                         
  
 
Read Full Discussion Thread for this article