SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to join multiple tables?

    how to inner join with multiple tables in mysql...

  2. #2
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Code sql:
    SELECT tbl1.a_field, tbl2.another_field, tbl3.yet_another_field FROM
        table1 AS tbl1
        INNER JOIN table2 AS tbl2 ON (tbl1.id=tbl2.id)
        INNER JOIN table3 AS tbl3 ON (tbl2.id=tbl3.id)
    Is that what you mean?

  3. #3
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Code:
    SELECT
      ...
    FROM ...
    INNER JOIN ...
    ON ...
    INNER JOIN ...
    ON...
    ecc.


Tags for this Thread

Bookmarks

Posting Permissions

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