When joining tables one can traditionally use the SQL89 way of joining like
SELECT * FROM t1, t2 WHERE t1.id = t2.t1_id;
But since the SQL92 standard, we can now join using the JOIN syntax
SELECT * FROM t1 JOIN t2 on t1.id=t2.t1_id;
Is there any reason why someone would SELECT
from multiple tables without joining?
Now, I know people concatenate data using UNION
, but that is not what I'm talking about.
Is the reason we add tables with commas in the FROM
clause strictly for backwards compatibility? Or are there any realistic scenarios which using the old syntax would be impossible by doing just joins?