When I join three or more tables together with a common column, I would write my query as follows:
SELECT * FROM a, b, c WHERE a.id = b.id AND b.id = c.id
a colleague recently asked me why I didn’t deal with explicit Transitive Closure joins in my queries like this:
SELECT * FROM a, b, c WHERE a.id = b.id AND b.id = c.id AND c.id = a.id
Are there really any benefits to this? Can the optimizer do this for himself?
edit: I know this is a wicked syntax, but this is a quick and dirty example of legal code outdated +1 @ Stu to clear it
source share