Flatten association table to multi-value column?

后端 未结 4 1118
旧时难觅i
旧时难觅i 2021-01-07 07:48

I have a table with just product ID\'s and category ID\'s (products can be in more than one category). How can I flatten the category ID\'s into a product column so I end us

4条回答
  •  [愿得一人]
    2021-01-07 08:21

    There's no in-built way to do it in MSSQL.

    Simulating group_concat MySQL function in Microsoft SQL Server 2005? has a good description of how to go about implementing a workaround.

提交回复
热议问题