I have a broad question regarding multiple joins in teradata.
For example, I have: table1, table2, table3, table4. I want to do an INNER JOIN
for all of them
So:
SELECT a.*, b.*, c.*, d.*
FROM table1 a
JOIN table2 b ON a.acct_ID = b.acct_ID
JOIN table3 c ON a.acct_ID = c.acct_ID
JOIN table4 d ON a.acct_ID = d.acct_ID
So what's happening here is that every time a join takes place, a temporary table is created in this succession (((table 1+ table 2)+table 3)+table 4)
?
Should the on statement be b.acct_ID = c.acct_ID
and c.acct_ID = d.acct_ID
in order for the statement to be efficient or does this not make a difference since a temporary table is created?