Join Syntax.
chattabaugh
Posts: 12
Our shop is split over the type fo join syntax to use. Some use the old style of:
SELECT ...
FROM Table1, Table2, Table3
WHERE Table1.ID = Table2.T1ID
AND Table2.ID = Table3.T2ID
And some use the ANSI 92 Style of:
SELECT ...
FROM Table1
INNER JOIN Table2 ON Table1.ID = Table2.T1ID
INNER JOIN Table3 ON Table2.ID = Table3.T2ID
In the case of outer joins, we even have some mixed syntax....
FROM Table1, Table2 LEFT JOIN Table3 ON Table2.ID = Table3.T2ID
WHERE Table1.ID = Table2.T1ID
If would be very benificial to be able to reformat to one of the two styles.
SELECT ...
FROM Table1, Table2, Table3
WHERE Table1.ID = Table2.T1ID
AND Table2.ID = Table3.T2ID
And some use the ANSI 92 Style of:
SELECT ...
FROM Table1
INNER JOIN Table2 ON Table1.ID = Table2.T1ID
INNER JOIN Table3 ON Table2.ID = Table3.T2ID
In the case of outer joins, we even have some mixed syntax....
FROM Table1, Table2 LEFT JOIN Table3 ON Table2.ID = Table3.T2ID
WHERE Table1.ID = Table2.T1ID
If would be very benificial to be able to reformat to one of the two styles.
Comments
Hi,
this is a very good idea in case of inner joins. I have saved this for consideration in next releases.
Regards,
Andras
Red Gate Software Ltd.