次の例の操作方法を理解する必要があります。
次の 2 つのテーブルがあるとします。
**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
そして、次のテーブルを返したい:
Child Child_Shirt_Color Parent Parent_Shirt_Color
Bob Red Kate Blue
Parent_Shirt_Color を取得するにはどうすればよいですか? 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';
これについて私が調べた他の例では、「WITH」の使用について話しましたが、サポートされていないと言うたびにエラーが発生します。また、私は親と子の間に非常に長い関係があるため、リスト全体を返してほしくありません - 2-3 世代だけです。
オラクルの使用
どんな助けでも大歓迎です。ありがとう!