About 829,000 results
Open links in new tab
  1. Rolling up multiple rows into a single row and column for SQL

    Oct 24, 2025 · Learn how to roll-up multiple rows into one row and one column with concatenation in SQL Server with FOR XML, STUFF and STRING_AGG.

  2. SQL Server: combining multiple rows into one row

    This is an old question, but as of the release of Microsoft SQL Server 2017 you can now use the STRING_AGG() function which is much like the GROUP_CONCAT function in MySQL.

  3. SQL Combine Multiple Rows into One Row (3 Easy Methods

    Oct 1, 2025 · Master how to SQL combine multiple rows into one row using STRING_AGG, conditional aggregation, and XML/JSON tricks. Learn with real interview-style examples and …

  4. How to Concatenate Text From Multiple Rows in SQL Server

    Jul 23, 2025 · In this article, we will discuss how to concatenate text from multiple rows into a single text string in SQL Server using various methods which are COALESCE Function, XML …

  5. How to combine rows into one string in SQL [SOLVED]

    Nov 16, 2022 · STRING_AGG is a built-in string function used to concatenate multiple rows of data into a single string. This function takes all expressions from rows, convert into string type, …

  6. How to get multiple rows data in single row in SQL

    Aug 6, 2022 · This article demonstrates how to Convert multiple rows into a single comma separated row, it can be done by using in-built SQL functions.

  7. Concatenating Multiple Row Values into a Single

    Mar 15, 2005 · In scenarios where you need to consolidate multiple rows into a single, comma-separated value, you can achieve this using FOR XML PATH. This script demonstrates how to …

  8. sql server - Combine column from multiple rows into single row ...

    I've got some customer_comments split out into multiple rows due to database design, and for a report I need to combine the comments from each unique id into one row.

  9. How to concatenate text from multiple rows into a single text …

    Oct 27, 2015 · I wish the next version of SQL Server would offer a new feature to solve multi-row string concatination elegantly without the silliness of FOR XML PATH.

  10. Converting row values in a table to a single concatenated string

    This article covers a number of techniques for converting all the row values in a column to a single concatenated list. For example a table might contain 8 rows which requires converting to a …