-3

I need to join 3 tables using an explicit join. There is not a common key across all three tables.

1 Answers1

1

If you need to join tables you need a common key for every pair.
So you can try something like this:

SELECT t1.*, t2.*, t3.*
FROM table1 t1 INNER JOIN table2 t2
    ON t1.id1 = t2.id1
INNER JOIN table3 t3
    ON t2.id2 = t3.id2
Marco
  • 56,740
  • 14
  • 129
  • 152
  • @Pepper: so, do you need something like my example? If not, provide more details please... – Marco Nov 03 '11 at 17:13
  • I believe this will work. From my understanding this is postgresql and I am not familiar with it. I've worked with all the other flavors just not this one. Thank you for your help. – Pepper Crist Nov 03 '11 at 17:16
  • Well, then I guess I've just never had to do one before *blush* – Pepper Crist Nov 03 '11 at 17:20