I want to join table Documents(id, name) and Tags(tagId, tagname, docId(FK)). However result will return many redundant rows because one document can has many tags:
Document_name |Tag
----------------------
document01 tag01
document01 tag02
document02 tag01
All I try to resolve is:
document_name |Tags
----------------------------
document01 | tag01, tag02
document02 | tag01
or can be like this:
Document_name |Tag_1 |Tag_2 |Tag_...
---------------------------------------
document01 tag01 |tag02
document02 tag01
Anyone know how can implement this case? Thanks a lot! (I'm trying to find other answer in this site, but I don't know suitable keyword to search in this case)