What this query does to create comma delimited list SQL Server?

前端 未结 4 1595
轮回少年
轮回少年 2020-11-22 11:39

I\'ve written this query with the help of google to create a delimited list from a table but I didn\'t understand anything from this query.

Can anyone explain me wha

4条回答
  •  我在风中等你
    2020-11-22 11:56

    The outer query retrieves a list of department numbers, and the subquery is then run for each department number to return all names belonging to that department. The subquery uses the FOR XML statement to format the output into a single line comma separated list.

提交回复
热议问题