Hi Guys,
i have 2 tables:
Table1
and
Table2 Table2
What i want to do is to get result like here:
ExpectedResult
so as you can see for Eech Per and Kind column (co Mammal and Dog and Cat) i just appended one new column = Food.
How can i write SQL to do it?
Best,
Jacek
i have 2 tables:
Table1
ID | Pet | Kind | Color |
---|---|---|---|
1 | Cat | Mammal | Black |
2 | Dog | Mammal | White |
Table2 Table2
ID | Food |
---|---|
1 | Fish |
2 | Meet |
What i want to do is to get result like here:
ExpectedResult
ID | Pet | Kind | Color | Food |
---|---|---|---|---|
1 | Cat | Mammal | Black | Fish |
4 | Cat | Mammal | Black | Meet |
5 | Dog | Mammal | White | Fish |
6 | Dog | Mammal | White | Meet |
How can i write SQL to do it?
Best,
Jacek