jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: Left outer joins in SQL2
Date Tue, 29 Mar 2011 13:56:13 GMT

> Select * from [sling:SamplePage] as page left outer join
> [sling:SampleContent] as content on ISDESCENDANTNODE(content,page)
> where page.n1prop1 = 'page1' and content.n2prop1 = 'XXXXX';

I think this should return 0 rows.

>    The result of a left outer join (or simply left join) for table A and
>    always contains all records of the "left" table (A), even if the
>    join-condition does not find any matching record in the "right" table

Yes, but the "join condition" is ISDESCENDANTNODE(content,page).

content.n2prop1 = 'XXXXX' is part of the "where condition". The where
condition is to be evaluated after the join, so the row should not be part
of the result.

At least that's what happens in SQL databases.


View raw message