DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: inner join...

  1. #1
    Join Date
    Mar 2005

    inner join...


    ...I have 4 tables wich have almost the same fields (one of them has some field in plus). For interogate this tables I try to use inner join, but I without succesful. I see the tutorial for 2 table but when I try with 4 tables don't work.
    In this tables exist one field (COMM) wich is in all tables, and I want to see all records wich have the same value in COM fields.
    Could you show me a SQL code for this my situation? Belive me please, before to ask this, I try to do my self...but, maybe is to hard for me...

    thanks and the best regards!

  2. #2
    Join Date
    Aug 2004
    Orange, California
    Ok t1, t2, t3, t4 are your tables:
    SELECT t1.comm, t2.stuff, t3.otherstuff, t4.morestuff
    FROM ((t1 INNER JOIN t2 ON t1.comm = t2.comm) INNER JOIN t3 ON t2.comm = t3.comm) INNER JOIN t4 ON t3.comm = t4.comm;

  3. #3
    Join Date
    Mar 2005
    thanks very much!

Similar Threads

  1. JOIN physical location vs ON location
    By LuluDev in forum Database
    Replies: 2
    Last Post: 02-13-2007, 11:32 AM
  2. Add table to view
    By franklch in forum Database
    Replies: 3
    Last Post: 05-19-2005, 04:39 PM
  3. JOIN vs WHERE clause.
    By Igor in forum Database
    Replies: 2
    Last Post: 12-31-2002, 11:53 AM
  4. Problem with stored procedure
    By yip in forum Database
    Replies: 1
    Last Post: 09-24-2002, 12:31 AM
  5. Replies: 1
    Last Post: 06-26-2002, 10:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center