Accomplishing MYSQL's Group_Concat in SQL Server [duplicate]
问题 This question already has answers here : How to concatenate text from multiple rows into a single text string in SQL server? (47 answers) Closed 6 years ago . I'm porting an application I originally wrote to run on Apache using PHP and a MySQL database. One of the queries used the MySQL functions of Concat_WS and Group_Concat to first concatenate a few different columns into one string, and then concatenate all items that were grouped together by the Group_By clause. As an example: ID Name