テーブル Documents(id, name) と Tags(tagId, tagname, docId(FK)) を結合したい。ただし、1 つのドキュメントに多くのタグを含めることができるため、結果は多くの冗長な行を返します。
Document_name |Tag
----------------------
document01 tag01
document01 tag02
document02 tag01
私が解決しようとしているのは次のとおりです。
document_name |Tags
----------------------------
document01 | tag01, tag02
document02 | tag01
または次のようにすることができます:
Document_name |Tag_1 |Tag_2 |Tag_...
---------------------------------------
document01 tag01 |tag02
document02 tag01
このケースを実装する方法を知っている人はいますか? どうもありがとう!(このサイトで他の答えを見つけようとしていますが、この場合の検索に適したキーワードがわかりません)