Table_Design:
ID
"Alpha"
"Beta"
Table_Size:
Design_ID Size
"Alpha" S
"Alpha" M
"Alpha" L
"Beta" S
"Beta" L
Table_Color:
Design_Id Color
"Alpha" "Black"
"Alpha" "Blue"
"Alpha" "Red"
"Alpha" "Green"
"Beta" "Orange"
select D.ID, S.Size, C.Color from
Table_Design D
Left Outer Join
Table_Size S
ON D.ID = S.Design_Id
Left Outer Join
Table_Color C
ON D.ID = C.Design_Id
where
D.ID = 'Alpha'
Yields:
D.ID S.Size C.Color
Alpha S Black
Alpha S Blue
Alpha S Red
Alpha S Green
Alpha M Black
Alpha M Blue
Alpha M Red
Alpha M Green
Alpha L Black
Alpha L Blue
Alpha L Red
Alpha L Green
Is there anyway to write a query to return this instead:
D.ID S.Size C.Color
Alpha S Black
Alpha M Blue
Alpha L Red
Alpha Green