Използвайте Cross Join
и group_concat
.
Заявка
select t1.name,group_concat(distinct t2.color separator ',') as color
from tbl1 t1,tbl2 t2
where t1.name = 'Paul'
group by t1.name;
Използвайте Cross Join
и group_concat
.
Заявка
select t1.name,group_concat(distinct t2.color separator ',') as color
from tbl1 t1,tbl2 t2
where t1.name = 'Paul'
group by t1.name;