I want to join a table which has multiple rows and need to merge one of the column from all the rows into single column.
select a.parent_id,a.parent_name,concat(b.child_name) from parent a
join children b on (a.parent_id=b.parent_id);
This should return all the parent rows and each parent row should have all its children's.
i am thinking to group with parent_id but getting multiple records (one record per child). What logic i can implement here apart from grouping to get all child's for a parent in single row.