SQL Select with Binary Link
Ruslan Zasukhin
sunshine at public.kherson.ua
Sat Jun 14 00:27:21 CDT 2008
On 6/13/08 8:22 PM, "william humphrey" <shoreagent at gmail.com> wrote:
Hi William,
> SELECT Phone.*
> FROM phone JOIN customer ON customerphone
> WHERE customer.ID = 5
>
> Also if there is no ambiguity you can do lazy case
>
> SELECT Phone.*
> FROM phone, customer
> WHERE customer.ID = 5
>
> How do you modify the above so a record is returned with customer fields
> even if there is no corresponding phone records?
For this you need OUTER join.
SELECT Customer.*
FROM Customer LEFT OUTER JOIN Phone
LEFT OUTER JOIN selects record from the left table, even if they are not
linked to any record from the right table.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list