Many to Many Relations - Join?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Many to Many Relations - Join?

  1. #1
    Join Date
    Jul 2001
    Posts
    334

    Many to Many Relations - Join?

    Hi All, I have 2 tables with many to many relation, how I can join? please give me a simple example according to the below tables:

    TABLE_A
    ID
    --
    23
    23
    23
    45
    45
    67

    TABLE_A
    ID
    --
    23
    23
    23
    45
    45
    67

    Thanks in advance.

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    It depends what result you want. You could just join them, but you might be looking for ...

    Code:
    select ..
    from
       (select distinct id from table_a) t1,
       (select distinct id from table_b) t2,
    where
       t1.id = t2.id
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Jul 2001
    Posts
    334
    Hi slimdave,

    need to select some columns from table_a and some from table_b. How it works?

    Appreciate.

  4. #4
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,136
    Quote Originally Posted by aph
    Hi slimdave,

    need to select some columns from table_a and some from table_b. How it works?

    Appreciate.
    Post the table definition, sample data, and your requirements.

    Tamil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width