outer join for parent child chain

Posted by dotnetcoder on Stack Overflow See other posts from Stack Overflow or by dotnetcoder
Published on 2010-04-15T16:29:30Z Indexed on 2010/04/15 16:33 UTC
Read the original article Hit count: 301

Filed under:
|
|

Considering below tables and relationships:

parent --1:Many-- children --1:Many-- shubchildren

  • Parent may or many not have children records.
  • children always have subchildren records.

I wan to write a qiery to select parent names where any if matched parent.name,children.name or subchildren.name

Here i understand I have to do a left outer join between parent and children. But what kind of join should I put between children and subchildren ?

© Stack Overflow or respective owner

Related posts about sql

Related posts about outer-join