Gilles Tran wrote:
> 47b1a492$1@news.povray.org...
>> OK, I've heard a lot about inner joins and outer joins but don't really
>> know them or how to use them.
>>
>> I've actually been using SQL for 10 years now, but never managed to
>> completely figure this out.
>>
>>
>> Lets say I have (2) tables - (2) column each
>>
>> Person Limbs
>> Index Name PersonIndex Type
>
> I'd do it a little differently ;)
>
> Table:Persons
> Person_code
> Person_name
>
> Table:Limbs
> Limb_code
> Limb_type
>
> Table:Person_limbs
> Person_code
> Limb_code
>
> The Person_limbs table make it possible to give a person a variable list of
> limb types.
>
> Now you want to list the names of persons who have limbs of the type "legs"
> :
> SELECT Person.Person_name
> FROM (Limbs INNER JOIN Person_limbs ON Limbs.Limb_code =
> Person_limbs.Limb_code) INNER JOIN Person ON Person_limbs.Person_code =
> Person.Person_code
> WHERE (((Limbs.Limb_name)="legs"));
>
> G.
>
Yes, you are right.
My example was not thought out to that degree.
It was only to get information on the JOIN functionality.
Thanks
Tom
Post a reply to this message
|