重複の可能性:
SQLのselectgroupbyとstringconcat
私のSQLテーブルは次のようになります。
City_Code Post_Code Post_Code_Description
100 A1 ABC
100 C8 XYZ
100 Z3 MNO
200 D4 LMN
300 E3 IJK
300 B9 RST
city_code
との間のマッピングPost_Code
です。1つCity_Code
は多くを持つことができますPost Codes
。次に、クエリを実行して次のようなものを取得します。
City_Code Post_Code Post_Code_Description
100 A1,C8,Z3 ABC,XYZ,MNO
200 D4 LMN
300 E3,B9 IJK,RST
これを手伝ってくれませんか。