On 24.05.2011, at 14:26, Jan Pazdziora wrote:

> Think of it as if you had
> 
>       (
>       select :user_id from dual
>       )
> 
> and an outer join of this subselect with that USGP.
> 
> The
> 
>       AND :user_id = USGP.user_id (+)
> 
> matches where the USGP.user_id is the same as :user_id, or where the
> USGP's columns have NULL value due to the records not being present at
> all.

Thanks, think I got it. So it's no different than the effect of (+) in the 
usual join conditions.

> You can try
> 
>       select web_customer.id, web_contact.id
>       from web_customer, web_contact
>       where web_customer.id = web_contact.id (+)
>               and 1 = web_contact.id (+)
> 
> to see something similar -- on my system it returns
> 
>               ID         ID
>       ---------- ----------
>                1          1
>                2
>                3
>                4
>                5
>               25
>               26
>               46
>               66

So basically the following in ANSI syntax would be equivalent:

select web_customer.id, web_contact.id 
from web_customer left join web_contact on web_customer.id = web_contact.id and 
1 = web_contact.id

Bes regards,
Julian




_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to