Learn how to concatenate multiple rows into a single string in SQL Server using STRING_AGG and FOR XML PATH methods. Complete guide with examples for modern and legacy versions.