none
how to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c RRS feed

  • Question

  • i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables
    Monday, February 24, 2014 1:20 PM

Answers

  • check if this helps:

    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.

    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

    • Proposed as answer by KEAARPEE Monday, February 24, 2014 8:13 PM
    • Marked as answer by Elvis LongModerator Monday, March 3, 2014 9:59 AM
    Monday, February 24, 2014 1:25 PM