Hi, I'm new to these forums and I've searched everywhere and can only find syntax and examples on how to join 2 and 3 tables using ANSI, but I need to join 4. For a traditional join it would be:
SELECT a.one, a.two, b.one, b.three, b.four, d.seven
FROM tablea a, tableb b, tablec c, tabled d
WHERE a.one = b.one
AND a.two = c.two
AND c.six = d.six;
Here are the tables:
_tableb_
one
three
four
_tablea_
one
two
_tablec_
two
six
_tabled_
six
seven
eight
Does anyone know how to do this using an ANSI join or have any resources that can point me in the right direction. I know if I wanted to join three tables it would be:
SELECT a.one, a.two, b.one, b.three, b.four, c.six
FROM tableb b JOIN tablea a ON b.one = a.one JOIN tablec c ON a.two = c.two;
so would joining a fourth be:
SELECT a.one, a.two, b.one, b.three, b.four, d.seven
FROM tableb b JOIN tablea a ON b.one = a.one JOIN tablec c ON a.two = c.two JOIN tabled d ON c.six = d.six; ???
Is the above correct or is there another way to do this using an ANSI Join?