...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!
06-13-2007, 09:19 PM
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;