For SQL, when did it start to be desirable to always use the words “Inner Join” instead of implicitly joining by:
select * from t1, t2 where t1.ID = t2.ID;
? Is it just for style or to distinguish between outer join or are there other reasons for it?
The INNER and OUTER JOIN syntax was formalized in the SQL-92 specification. In many database products such as MySQL and SQL Server, you can omit the “INNER” word from inner joins and simply use “JOIN”. Similarly, many database products let you omit the word “OUTER” and simply use “LEFT JOIN” or “RIGHT JOIN” for outer joins. The old outer join syntax of
*=or=*created ambiguities in many circumstances. Many products have or very soon will stop supporting the old outer join syntax.Prior to the SQL-92 specification, the vendors each used their own syntax indicated an outer join. I.e.,
*=was not universal (I seem to remember someone using?=). In addition, they did not implement the outer join in a universal way. Take the following example:The above query would generally yield:
Now try:
On some database products, you would get:
On others you would get:
In short, it is ambiguous as to whether the filtering on the unpreserved table should be applied before or after the join.