I need held understanding how to work with the following example.
Let's say I have these two tables:
**Table Name: Children**
Child Shirt_Color_ID Parent
Bob 1 Kate
Kate 2 Jack
Jack 3 Jill
. . .
. . .
**Table Name: Shirt_Colors**
Shirt_Color_ID Shirt_Color
1 Red
2 Blue
3 White
And I want to return a following table:
Child Child_Shirt_Color Parent Parent_Shirt_Color
Bob Red Kate Blue
How would I get the Parent_Shirt_Color in? I got how to show Child, Child_Shirt_Color, Parent:
select
Children.Child,
Shirt_Colors.Shirt_Color,
Children.Parent
from
Children,
Shirt_Colors
where
Shirt_Colors.Shirt_Color_ID = Children.Shirt_Color_ID and
Children.Child = 'Bob';
Other examples I have looked at for this, talked about using "WITH," but get errors every time I try saying it is unsupported. Also, I have a very very long relation between parents and children, so I do not want the entire list returned - only 2-3 generations.
Using Oracle
Any help would be appreciated. Thanks!