STUFF((SELECT ', '+ Column1 FROM Table1 FOR XML PATH('')),1,1,'') AS ConcatenatedColumn
StudentName ------------- Mary John Sam Alaina Edward Result: Mary, John, Sam, Alaina, Edward
How to solve 'incorrect syntax near the keyword WITH' problem?
Get the User Name and Domain Name from an Email Address in SQL
How to clean Query and Execution Plan Cache for Efficient Testing in MS SQL
Find numbers with more than two decimal places in SQL
Return number of rows affected by UPDATE statements in SQL